Skip to content

Releases: ing-bank/ginerr

v3.0.0

02 Dec 08:29
a773aa4
Compare
Choose a tag to compare

Change the internal method of saving errors entirely to make use of errors.As and errors.Is, removing the need for 3 separate methods as suggested in #7 by @bkmeneguello and implemented in #8.

V3 migration guide

V3 completely revamps the ErrorRegistry and now utilises the errors package to match errors.
The following changes have been made:

  • RegisterErrorHandler now requires a concrete instance of the error as its first argument
  • RegisterErrorHandlerOn now requires a concrete instance of the error as its second argument
  • RegisterStringErrorHandler has been removed, use static errors.New in RegisterErrorHandler to get this to work
  • RegisterStringErrorHandlerOn has been removed, use static errors.New in RegisterErrorHandlerOn to get this to work
  • RegisterCustomErrorTypeHandler has been removed, wrap unexported errors from libraries to create handlers for these
  • RegisterCustomErrorTypeHandlerOn has been removed, wrap unexported errors from libraries to create handlers for these
  • ErrorRegistry changes:
    • DefaultCode has been removed, use RegisterDefaultHandler instead
    • DefaultResponse has been removed, use RegisterDefaultHandler instead
    • SetDefaultResponse has been removed, use RegisterDefaultHandler instead

v0.0.2

05 Jun 08:00
032111d
Compare
Choose a tag to compare

Add deprecation notices in v1

v2.1.0

03 Jan 09:43
b8aa4a2
Compare
Choose a tag to compare

Use reflect to deduce the errortype dynamically

This is to fix when a custom error type (type SomeError error) would default to *error.errorString, while the value could hold a different implementation.
This will now be deduced correctly.

v2.0.1

16 Aug 13:10
abe91c6
Compare
Choose a tag to compare
v2.0.1 Pre-release
Pre-release

Add RegisterDefaultHandler as a method on the ErrorRegistry and deprecate SetDefaultResponse along with its properties in favour of a default handler.

v2.0.0

09 Aug 07:40
a97a032
Compare
Choose a tag to compare
v2.0.0 Pre-release
Pre-release

Prerelease of interface improvements and addition of context

v0.0.1

26 Mar 13:22
Compare
Choose a tag to compare
  • Removed unused generic from NewErrorResponse
  • Move creation of errorString handler to NewErrorRegistry call

v0.0.0

23 Mar 12:38
Compare
Choose a tag to compare

Initial release