Skip to content

Add logging on failure to create file - #3424

Merged
flovilmart merged 1 commit into
parse-community:masterfrom
acinader:add-logging-on-failure-to-filerouter
Jan 30, 2017
Merged

flovilmart merged 1 commit into
parse-community:masterfrom
acinader:add-logging-on-failure-to-filerouter

Conversation

@acinader

Copy link
Copy Markdown
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......

Comment thread src/Routers/FilesRouter.js Outdated
res.json(result);
}).catch(() => {
}).catch((e) => {
logger.warn(e.message, e);

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

@acinader updated the pull request - view changes

@steven-supersolid

Copy link
Copy Markdown
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