-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
error object lost in SchemasRouter #4871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Is it a recurring error / are you able to reproduce it? |
Yes. Anyway, having the original message appended in the Parse.Error would be nice, I think. |
Feel free to open a PR, I'd rather have the error logged as is with the logger, the error is forwarded to the client and it's leaky to forward database level errros in public :) |
Can it be something like:
|
at handle error level, I believe it’s already too late and the Db error may already be swallowed, but I may be wrong :) try it out :p |
the debug session tells me it's ok |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
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
The text was updated successfully, but these errors were encountered: