@commercelayer/sdk 2.1.0-alpha.6 → 2.1.0-alpha.7
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/lib/sdk.esm.js
CHANGED
@@ -963,6 +963,12 @@ var ApiError = /*#__PURE__*/function (_Error) {
|
|
963
963
|
return error && error.name === 'ApiError' && error.type === ErrorType.RESPONSE;
|
964
964
|
};
|
965
965
|
|
966
|
+
var _proto = ApiError.prototype;
|
967
|
+
|
968
|
+
_proto.first = function first() {
|
969
|
+
return this.errors.length > 0 ? this.errors[0] : undefined;
|
970
|
+
};
|
971
|
+
|
966
972
|
return ApiError;
|
967
973
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
968
974
|
|