Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Add context to error responses returned to client #84

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

shobitb
Copy link
Contributor

@shobitb shobitb commented Aug 11, 2022

This change is to preserve error context when sending error responses back to the client. It does so by using framework.NewRequestError(err, httpCode) instead of framework.NewRequestErrorMsg(errMsg, httpCode) in places where the err object is available.

This fixes #75

This change preserves error context when sending error responses back to the client. It does so by using `framework.NewRequestError(err, httpCode)`` instead of `framework.NewRequestErrorMsg(errMsg, httpCode)` in places where the err object is available.

This fixes TBD54566975#75
Copy link
Member

@decentralgabe decentralgabe left a comment

Choose a reason for hiding this comment

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

thanks!

@decentralgabe decentralgabe merged commit bb681c2 into TBD54566975:main Aug 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return Bad Request HTTP 400 context to client in error messages
2 participants