go-fuego / fuego

Golang Fuego - web framework generating OpenAPI 3 spec from source code
https://go-fuego.github.io/fuego/
MIT License
917 stars 46 forks source link

feat: add 500 error #194

Closed mugraph closed 4 weeks ago

mugraph commented 2 months ago

Awesome project :tada:

While trying it out I noticed the 500 error type was perhaps forgotten to be implemented. At least per the default errors section, there should be an InternalServerError type as well. If there was a decision to not include it, we should take it out from the docs ofc.

EwenQuim commented 4 weeks ago

Merged into a temporary branch. I'm editing the PR with changes proposed by @ccoVeille and merging into main just after.

Thanks for the suggestion!

And yes, by default HTTPError is an InternalServerError, so I just defined InternalServerError as a type alias :)