v7.2.1 Release
This release includes the following changes
-
Added some additional functionality to Error Framework:
- Added Enum type for FSPIOPErrorTypes which include a description and associated regex.
- Added Types on to existing Error Enums which contain a description and a regex.
- Added method to find FSPIOPErrorCodes from a numerical or string code.
- Added tests to find FSPIOPErrorCodes from a numerical or string code functionality.
- Added a 'name' param to the types for ErrorCode Enums
- Made the createFSPIOPError throw an INTERNAL_SERVER_ERROR when the apiErrorCode is undefined.
- findFSPIOPErrorCode now using superfast hash lookup
- Added 'name' to the FSPIOPErrorCodes enums. This is useful for comparisons (i.e. deep-equal, etc)
- Overloaded the FSPIOPError constructor to take in an additional parameter
useMessageAsDescription
to support creating FSPIOPError objects from raw errorInformation objects - Added the 'cause' to be automatically added as an extension.
- Added createFSPIOPErrorFromErrorInformation - Factory method to create an FSPIOPError based on the errorInformation object being passed in.
- Added validateFSPIOPErrorCode - Validate a code against the Mojaloop API spec, returns the enum or throws an exception if invalid
- Cleaned up some of the error handling framework factory code
- Fixed typo in error message.
-
Updated to latest dependencies:
- Have to bump the version up because I accidentally published the snapshot release as 7.2.0 instead of 7.2.0-snapshot
- Also updating package-lock