Goyave v2.10.1 Release Notes

Release Date: 2020-05-09 // almost 4 years ago
    • ๐Ÿ”„ Changed the behavior of response.File() and response.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 invalid
      • 4: An error occurred when opening network listener
      • 5: 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 everytime getHTTPClient() 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 the maxUploadSize 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.