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

fix(upload): log a message with the Error, not the Error itself #404

Merged
merged 1 commit into from
Aug 19, 2020

Conversation

LoneRifle
Copy link
Contributor

Problem and Solution

Winston does not natively handle Error objects when supplied as the sole argument to error(message: any), and as a result, Error does not get properly stringified. Replace with a call to error(message: string, ...meta: any[])

Screenshot

image

@LoneRifle LoneRifle requested a review from liangyuanruo August 13, 2020 04:45
Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

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

Replace with a call to error(message: string, ...meta: any[])

I think you forgot to add the file to the commit.

Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

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

as per comment

@LoneRifle
Copy link
Contributor Author

Replace with a call to error(message: string, ...meta: any[])

I think you forgot to add the file to the commit.

Nope, the file is there - 'Unable to check file: ' is the message, and meta will contain the Error

@LoneRifle LoneRifle requested a review from liangyuanruo August 13, 2020 09:17
@liangyuanruo liangyuanruo merged commit 5da7319 into develop Aug 19, 2020
@liangyuanruo liangyuanruo deleted the fix/upload/log-better branch August 19, 2020 04:39
xming13 pushed a commit to xming13/GoGovSG that referenced this pull request Aug 21, 2020
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.

2 participants