-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat: create uniform error structure #115
feat: create uniform error structure #115
Conversation
dc9cedb
to
e9ae2ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: james-a-morris <[email protected]>
Signed-off-by: james-a-morris <[email protected]>
8c54f8a
to
c3b2187
Compare
|
||
/** | ||
* A function used by `JSON.stringify` to specify which data will be serialized | ||
* @returns A formatted JSON | ||
*/ | ||
public toJSON(): Record<string, unknown> { | ||
return { | ||
statusCode: this.httpStatusCode, | ||
...super.toJSON(), | ||
}; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OOC why was this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would add the status code to the response code but this info is already exposed via the http status code that will get thrown.
No description provided.