You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+36-2Lines changed: 36 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ The error is converted by this module into the items below.
12
12
-**Error reason**: *Reason phrase* from the [HTTP RFC 7231 Response Status Codes][http-rfc-7231-6] for [Client Error 4xx][http-rfc-7231-6.5] and [Server Error 5xx][http-rfc-7231-6.6].
13
13
-**Error message**: This can be any text description, array, or object. It is usually the Mule `error.description` or developer-defined dataweave or text.
14
14
15
-
A JSON body response example is shown below.
15
+
A JSON body response example is shown below. Note that the top-level field name, `error`, is customizable.
16
16
17
17
**StatusCode: 400**
18
18
@@ -332,7 +332,41 @@ The dataweave should resolve to a string but any type is allowed. The default v
**Note: Leave this field empty if you do not want to propagate previous errors.**
335
+
**Set this field to an empty string if you do not want to propagate previous errors.**
336
+
337
+
### Response Key Name for Payload
338
+
This field allows you to customize the JSON key name where the error payload is set. This defaults to `error`, which is shown in the examples. This only supports changing the name of the top-level key; it does not change any other format. If you want the error payload to be the top-level element in the response, then set this field to empty string.
summary="Script to generate the previous error message. Usually pulled from the external system's response in the error object. Set empty string to ignore previous errors."
0 commit comments