Skip to content
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

Add logging on failure to create file #3424

Conversation

acinader
Copy link
Contributor

We're making some s3 changes and I was updating our config.

I did it wrong, and the create file failed. No big deal, but parse-server's response was a very unhelpful: [object Object] output to console.error :(

This change is local only to the FileRouter, which is necessary since we'll lose e which has the important bit of info in it as to why the operation failed.....

but i think we need a more global solution......

@@ -87,7 +88,8 @@ export class FilesRouter {
res.status(201);
res.set('Location', result.url);
res.json(result);
}).catch(() => {
}).catch((e) => {
logger.warn(e.message, e);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use .error?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me

@acinader acinader force-pushed the add-logging-on-failure-to-filerouter branch from e330775 to 4b69d47 Compare January 24, 2017 03:34
@facebook-github-bot
Copy link

@acinader updated the pull request - view changes

@steven-supersolid
Copy link
Contributor

LGTM

@flovilmart flovilmart merged commit d5940b1 into parse-community:master Jan 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants