Skip to content

error object lost in SchemasRouter #4871

@oallouch

Description

@oallouch

Hi,
I got a "Database adapter error" from SchemasRouter, but the original error gets eaten by:

.catch(error => { if (error === undefined) { throw new Parse.Error(Parse.Error.INVALID_CLASS_NAME,Class ${className} does not exist.); } else { throw new Parse.Error(Parse.Error.INTERNAL_SERVER_ERROR, 'Database adapter error.'); } });

Should the original message be appended ?
Should Parse.Error have another constructor argument (sourceError) ?
Should the original error be rethrown ?

Thx a lot (as always),

Olivier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions