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

Can you provide a callback function for the error in request path 404? If there is a business interruption, please handle the path error information uniformly #371

Open
liqingxi1116 opened this issue Nov 30, 2023 · 5 comments

Comments

@liqingxi1116
Copy link

pitaya/handler, url not found error

@liqingxi1116
Copy link
Author

Similar to gin's noRoute and noMethod, it allows me to customize error data structures

@liqingxi1116
Copy link
Author

for example , I don't want this {"code":"PIT-404","msg":"pitaya/handler: gateway.gateway.gadga not found"} data. I hope to customize the data structure

@bruce1125
Copy link
Contributor

what about checking the returned ERROR type?

@felipejfc
Copy link
Contributor

Should be a simple change if you wish to send a contribution

@pipiaha
Copy link

pipiaha commented Sep 27, 2024

#422

provide your own ErrWrapper in builder.ErrWrapper, Marshal method encodes any error(including your error types) into bytes for net transfer;Unmarshal method converts any error typed bytes into origin errors.Error, to insure that errors.Error still works inside pitaya framework. Hope it helps.

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

No branches or pull requests

4 participants