@adobe/aio-commerce-lib-webhooks 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @adobe/aio-commerce-lib-webhooks
|
|
2
2
|
|
|
3
|
+
## 1.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#498](https://github.com/adobe/aio-commerce-sdk/pull/498) [`f6aec01`](https://github.com/adobe/aio-commerce-sdk/commit/f6aec01a22ed185fe130170751353fae881c0f2d) Thanks [@oshmyheliuk](https://github.com/oshmyheliuk)! - Fix the webhook exception operation to emit the exception class under the `type` field instead of `class`, matching the Adobe Commerce webhook response spec. Previously the supplied exception class was ignored by Commerce.
|
|
8
|
+
|
|
3
9
|
## 1.1.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -46,7 +46,7 @@ const successOperation = () => ({ op: "success" });
|
|
|
46
46
|
const exceptionOperation = (message, exceptionClass) => ({
|
|
47
47
|
op: "exception",
|
|
48
48
|
...message && { message },
|
|
49
|
-
...exceptionClass && {
|
|
49
|
+
...exceptionClass && { type: exceptionClass }
|
|
50
50
|
});
|
|
51
51
|
/**
|
|
52
52
|
* Creates an add operation response
|
|
@@ -28,7 +28,7 @@ type SuccessOperation = {
|
|
|
28
28
|
*/
|
|
29
29
|
type ExceptionOperation = {
|
|
30
30
|
op: "exception"; /** Specifies the exception class. If not set, \Magento\Framework\Exception\LocalizedException will be thrown. */
|
|
31
|
-
|
|
31
|
+
type?: string; /** Specifies the exception message. If not set, fallbackErrorMessage or system default will be used. */
|
|
32
32
|
message?: string;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
@@ -28,7 +28,7 @@ type SuccessOperation = {
|
|
|
28
28
|
*/
|
|
29
29
|
type ExceptionOperation = {
|
|
30
30
|
op: "exception"; /** Specifies the exception class. If not set, \Magento\Framework\Exception\LocalizedException will be thrown. */
|
|
31
|
-
|
|
31
|
+
type?: string; /** Specifies the exception message. If not set, fallbackErrorMessage or system default will be used. */
|
|
32
32
|
message?: string;
|
|
33
33
|
};
|
|
34
34
|
/**
|
|
@@ -45,7 +45,7 @@ const successOperation = () => ({ op: "success" });
|
|
|
45
45
|
const exceptionOperation = (message, exceptionClass) => ({
|
|
46
46
|
op: "exception",
|
|
47
47
|
...message && { message },
|
|
48
|
-
...exceptionClass && {
|
|
48
|
+
...exceptionClass && { type: exceptionClass }
|
|
49
49
|
});
|
|
50
50
|
/**
|
|
51
51
|
* Creates an add operation response
|