Skip to content

Conversation

@titans-of-code
Copy link
Contributor

See readme for details.

biswa-mohanty and others added 12 commits August 30, 2020 10:09
…imized functionality.

Non-Opinionated Error Response
- Error response format simplified to remove opinionation.  The main items: removed API metadata from response and previous error message replaces regular message, not appended to it. See Compatibility section in README.
- Updated customization features to be more flexible for developers.  Mainly custom error and common error features use same functionality and allow devs to change consistently.
- The general feature-set remains the same, including replacing message with generated error and using previous errors.

Updated to Latest XML SDK
- Updated mule-extensions-maven-plugin to 1.4.0 (latest)
- Renamed module to module-error-handler-plugin to be consistent with SDK guidelines.  This made the Mule XML component namespace change. See https://docs.mulesoft.com/mule-sdk/1.1/xml-sdk
- Changed name of resources subfolder.  Only the folder matching the underscored module name is exported.
- Removed content from mule-artifact.json that are now generated.
- Fixed and validated JSON schema for the custom errors definition field.   It was incorrect previously.  I'm not convinced this is enforced, but at least the schema is now correct.

Optimization
- Removed global configuration, since API name and version are not used.
- Moved dataweave into common.dwl for reuse and common functions for devs.
- Added more HTTP/APIKIT errors to defaultErrors.dwl and greatly simplified using the generated error message.
- Added default error response into defaultErrors.dwl, UNKNOWN, to be used if there are no matches. Easier to manage in this file instead of the mule xml file.  Also allows dev's to override in custom error definition.
- Reduced transforms/components in plugin's body.  Only uses 2 set-var and 1 transfomer.
- Used more performat/simple dataweave: mergeWith & update.  Both are valid for Mule 4.2+.

General
- Added example custom errors file in /examples folder.
- Revised/updated README with new screenshots to match latest version.
- Added special common error for expressions, to allow for more secure handling of those errors.
@sf-charles sf-charles merged commit 5e3d62c into mulesoft-catalyst:master Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants