Skip to content

Releases: thalesfsp/customerror

v2.0.0

30 May 23:13

Choose a tag to compare

What's Changed

  • v2.0.0: bug-fix & hardening release (/v2 path, Go 1.25, deps, lint v2) by @thalesfsp in #4

New Contributors

Full Changelog: v1.2.9...v2.0.0

v1.2.7

17 Oct 00:30

Choose a tag to compare

Full Changelog: v1.2.1...v1.2.7

v1.2.0

23 Jun 00:06

Choose a tag to compare

  • Renames WithCode to WithErrorCode.

v1.1.1

29 Mar 22:14

Choose a tag to compare

Added

  • Added NewNotFoundError.
  • Added built-in languages constants.
  • Now when using WithLanguage, it lookups for both xy and xy-ZW.
  • Added translations to the prefix.

Changed

  • Improved error messages.

v1.1.0

27 Mar 01:07

Choose a tag to compare

🎉 Announcing v1.1.0!

This new version introduces some (beta) exciting features! One of the most important additions is the ability to create an App's catalogue of predefined errors. Having a catalogue of predefined errors is crucial for any application, especially as it grows and becomes more complex. With a catalogue, it's possible to build a comprehensive set of reusable error codes able to cover many different possible scenarios. The unique identifier makes it easier to identify and resolve issues quickly, indirectly positively impacting the development workflow. Predefined error codes ensure that messages are consistent and easy to understand. Consistency is key, particularly important when dealing with complex/complicated/legacy applications. A well-defined catalogue of errors can provide clear and concise error messages that speed up the process from identifying an error to taking the appropriate action. In addition to the catalogue feature, I also have added support for translations in this release which is essential for applications with a global user base. Finally, in addition to providing a better end-user experience, predefined errors also positively impact our development process. By "forcing" developers to think about errors and error handling during the design phase, avoiding potential issues down the road. This helps us catch and fix mistakes earlier in the development process, saving time and resources.

v1.0.17

03 Mar 01:29
f009acc

Choose a tag to compare

  • JSON error should only contain keys with content.

v1.0.16

02 Mar 21:37
bd7ffda

Choose a tag to compare

  • Fixed fields MarshalJSON.

v1.0.15

02 Mar 21:12
c6901d9

Choose a tag to compare

  • WithField which allows to pass a single Key/Value pair. WithFields which allows to set the whole map of fields. It's thread safe.

v1.0.14

17 Feb 00:11
9404912

Choose a tag to compare

  • Added the ability to factorize (NewFactory) custom errors with pre-defined tags and fields.

v1.0.13

16 Feb 19:33
8797ef1

Choose a tag to compare

  • Added the ability to add fields (WithFields) to the error enhancing the error message with structured information. It joins WithTags as an effort to increase performance while analyzing logs.