Comparing version 2.2.2 to 2.2.3
@@ -12,3 +12,3 @@ { | ||
], | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"author": "Igor Balos", | ||
@@ -15,0 +15,0 @@ "contributors": [ |
@@ -39,2 +39,20 @@ import { ErrorHandler } from "../../src/client/ErrorHandler"; | ||
it('422', () => { | ||
const errorHandler = new ErrorHandler(); | ||
const error: any = { | ||
name: "Test name", | ||
body: { | ||
Message: "Test message", | ||
ErrorCode: 422 | ||
}, | ||
statusCode: 422 | ||
}; | ||
let postmarkError = errorHandler.generateError(error); | ||
expect(postmarkError).to.be.an.instanceof(Errors.ApiInputError); | ||
expect(postmarkError.name).to.equal('ApiInputError') | ||
expect(postmarkError.message).to.equal(error.body.Message); | ||
}); | ||
it('500', () => { | ||
@@ -41,0 +59,0 @@ const errorHandler = new ErrorHandler(); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5325
31183896
232