Goyave v2.10.1 Release Notes
Release Date: 2020-05-09 // almost 4 years ago-
- ๐ Changed the behavior of
response.File()
andresponse.Download()
to respond with a status 404 if the given file doesn't exist instead of panicking. - ๐ Improved error handling:
log.Panicf
is not used anymore to print panics, removing possible duplicate logs.- Added error checks during automatic migrations.
goyave.Start()
now exits the program with the following error codes:2
: Panic (server already running, error when loading language files, etc)3
: Configuration is invalid4
: An error occurred when opening network listener5
: An error occurred in the HTTP server
๐ This change will require a slightly longer
main
function but offers better flexibility for error handling and multi-services.if err := goyave.Start(route.Register); err != nil { os.Exit(err.(\*goyave.Error).ExitCode) }
- ๐ Fixed a bug in
TestSuite
: HTTP client was re-created everytimegetHTTPClient()
was called. - ๐ Fixed testing documentation examples that didn't close http response body.
- ๐ Documentation meta improvements.
- Protect JSON requests with
maxUploadSize
. - ๐ง The server will now automatically return
413 Payload Too Large
if the request's size exceeds themaxUploadSize
defined in configuration. - ๐ The request parsing middleware doesn't drain the body anymore, improving native handler compatibility.
- 0๏ธโฃ Set a default status handler for all 400 errors.
- ๐ Fixed a bug preventing query parameters to be parsed when the request had the
Content-Type: application/json
header. - โ Added a dark theme for the documentation. It can be toggled by clicking the moon icon next to the search bar.
- ๐ Changed the behavior of