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

net/http: http server Golang does not allow to handle unexpected errors #30164

Open
arealshadow opened this Issue Feb 11, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@arealshadow
Copy link

arealshadow commented Feb 11, 2019

What version of Go are you using (go version)?

1.10.7

$ go version
go version go1.10.7 windows/amd64

Does this issue reproduce with the latest release?

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

When I'll put % to my HTTP server go cause '400 Bad Request'
Example: http://localhost/somerequest%

That's all want to know maybe another mimic error we have?
And how to handle them to my custom messages.

What did you expect to see?

What did you see instead?

@agnivade

This comment has been minimized.

Copy link
Member

agnivade commented Feb 11, 2019

Please mention exactly what you did. And why you expect the 400 response to be a bug.

Regarding your other questions, you will get better answers on any of the forums.

@katiehockman katiehockman changed the title http server Golang does not allow to handle unexpected errors net/http: http server Golang does not allow to handle unexpected errors Feb 11, 2019

@katiehockman katiehockman added this to the Unplanned milestone Feb 11, 2019

@arealshadow

This comment has been minimized.

Copy link
Author

arealshadow commented Feb 16, 2019

Hello, I want to use m own message to all of http server error of Go like 400 bad requests.

@agnivade

This comment has been minimized.

Copy link
Member

agnivade commented Feb 16, 2019

Why can't you wrap your requests in a middleware and use your own message ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.