github gofr-dev/gofr v1.64.0

latest releases: pkg/gofr/traces/exporters/gcp/v0.2.0, pkg/gofr/metrics/exporters/gcp/v0.3.0, pkg/gofr/datasource/surrealdb/v0.4.0...
one hour ago

Release v1.64.0

๐Ÿš€ Features

๐Ÿ”’ Hide internal error messages

A handler error with no status code, or a database error, is returned to the client with its own text today, which can expose a driver message or other internal detail. HIDE_INTERNAL_ERRORS=true replaces that text with a generic Internal Server Error across HTTP, gRPC, GraphQL and MCP, while the original error is still logged. A status-coded error keeps its message, since that text is written for clients. The custom ResponseMarshaller fields of a hidden error are dropped as well. Default off.

Config Description Default
HIDE_INTERNAL_ERRORS Replace the text of an unclassified or database error with a generic message in responses false

๐Ÿ”ง Enhancements

๐Ÿงญ Built-in routes are marked at registration

GoFr now marks each of its own routes โ€” /.well-known/health, /.well-known/alive, /favicon.ico, the OpenAPI and Swagger routes, and /.well-known/graphql/ui โ€” at the point they are registered. Request-time code can now tell a built-in route apart from an application route under the same prefix, by where it was registered rather than by its path.

๐Ÿ› ๏ธ Fixes

HTTP & services

  • Bind a whole-number JSON value to a float form field instead of rejecting it
  • Keep service-address credentials out of the logs, the metric labels and the span names
  • Add the latency unit (ยตs) to the JSON log of an inter-service HTTP call
  • Keep the struct name in a bind error message
  • Treat a nil collection as absent error data, not an empty object
  • Fall back to the container logger when logging on a hand-built Context

gRPC

  • Apply auth and interceptors that are added after RegisterService
  • Recover a handler panic without sending the stack trace to the client
  • Add the response-time unit to the JSON RPC log

SQL & datasources

  • Keep the MongoDB client and register its metrics when MongoDB is down at startup
  • Forward the bind values and the CAS destination correctly for Cassandra and ScyllaDB
  • Use the entity's primary key for CRUD GET and DELETE by id
  • Guard against a nil S3 client before the connection is ready

Redis

  • Log every command of a pipeline, not all but the last

Files

  • The local store's RemoveAll, Rename and OpenFile no longer delete or truncate the wrong files; the local store now uses the os package directly, instead of object-store code that lost data on a real filesystem (since v1.47.0)
  • Limit the total uncompressed size of a zip, not only each file
  • Keep OpenFile(O_RDWR) off the application host for cloud stores, and stop Seek and ReadAt panicking
  • Clean up the multipart temporary file

Messaging

  • Stop MQTT Subscribe panicking when the topic is unsubscribed while it waits

Observability

  • Redact TRACER_URL credentials in the gofr exporter errors
  • End Solr spans on a failed request

Lifecycle

  • Cancel a running cron job's context when the scheduler stops
  • Warn when readiness checks are registered but the HTTP server never starts

Full Changelog: v1.63.1...v1.64.0

Don't miss a new gofr release

NewReleases is sending notifications on new releases.