2025-08-03
- Updated module to
github.com/ooaklee/reply/v2
2025-07-15
- Updated
ErrorManifestto useerroras the key instead ofstring - Updated
replier.goto reflect the changes toErrorManifestand useerrors.Isfor error matching - Updated
README.mdto reflect the changes - Reflected changes in
examples/example_simple_api.goand provide examples of how to use it with errors
2025-07-13
- Updated
go.modto go 1.20 - Updated
NewHTTPErrorResponseto behave likeNewHTTPMultiErrorResponsewhen manifest errors are wrapped, i.e.errors.Join(errs...) - Updated
README.mdto reflect the changes toNewHTTPErrorResponseand provide an example of how to use it with wrapped errors - Added a new test case to verify the changes
2021-09-11
- Update top-level response members from
meta,statusanddata->meta,errorsanddata - Updated
Manifest Error Itemfields - Updated logic & added new aide
NewHTTPMultiErrorResponseto support multiple error response objects in response - Refactored code
- Added logic to support users passing custom error transfer objects (
TransferObjectError),reply.WithTransferObjectError- Added
RefreshTransferObjectmethod call toTransferObjectError
- Added
- Updated Token attributes & methods on base
Transfer Objectto have a generic name to cover cases where API uses different token identifiersAccessToken->TokenOne&RefreshToken->TokenTwo
- Added logic to set
StatusCodeif not set already. Defaults to400.
2021-09-11
- Refactor Token attributes & methods to have a more general name to make use of cases where API uses different token identifiers less confusing
AccessToken->TokenOne&RefreshToken->TokenTwo- Dev can create custom
TransferObjectto set JSON attribute to match their use case
- Dev can create custom
- Added logic to set
StatusCodeif not set already. Defaults to400. - Updated README to better describe the library
2021-09-10
- Refactored logic to allow users to pass custom error transfer objects (TransferObjectError),
reply.WithTransferObjectError- Added
RefreshTransferObjectmethod call toTransferObjectError
- Added
- Updated
example simple apito use the new Replier Option and update thetransfer object error
2021-09-10
- Added new aide
NewHTTPMultiErrorResponseto support multiple error response - Updated
example simple apito use the new aideNewHTTPMultiErrorResponse - Added logic to handle/ create multiple error response
- Refactor code to make it more readable with new logic
2021-09-09
- Update top-level response members from
meta,statusanddata->meta,errorsanddata - Updated underlying logic to how an error is handled
- Updated
Manifest Error Itemattributes
2021-09-04
- Fixed bug in logic for merging error manifests
- Added helper functions (aides) to help users more efficiently use the library
2021-09-04
- Fixed bug in logic for merging error manifests
2021-09-03
- Initial logic for helper functions (
aides) to help users more efficiently use the library
2021-08-31
- Added licensing information
- Fixed typos
2021-08-28
- Refactored code
- Utilise error returned in
NewHTTPResponse - Added log entry for unfound manifest error item.
2021-08-27
- Updated logic for the setting headers.
- Added logic to default to JSON
content-type
2021-08-26
- Enforced
response priority, priority is declared as follows:- Error response
- Token response (access token/ refresh token)
- Data response
- Default response
Note - Default response occurs if none of the attributes expected to satisfy the other response types is satisfied. The JSON response for the default response returned will be:
{
"data": "{}"
}- Added ability to send responses based on singular error.
NOTE: If the error does not exist in the
error manifestreply will default to 500 - Internal Server Error