Merged in feat/sas-otp-error-handling (pull request #1272)
Feat/sas otp error handling * Improve error handling for SAS OTP * Remove failing and deprecated test Approved-by: Joakim Jäderberg
This commit is contained in:
@@ -4,13 +4,6 @@ import { parseSASRequestOtpError } from "./requestOtpError"
|
||||
|
||||
describe("requestOtpError", () => {
|
||||
it("parses error with invalid error code", () => {
|
||||
const error = {
|
||||
status: "status",
|
||||
error: "error",
|
||||
errorCode: "a",
|
||||
databaseUUID: "9ffefefe-df0e-4229-9792-5ed31bef1db4",
|
||||
}
|
||||
|
||||
const actual = parseSASRequestOtpError({
|
||||
status: "status",
|
||||
error: "error",
|
||||
@@ -21,17 +14,4 @@ describe("requestOtpError", () => {
|
||||
errorCode: "UNKNOWN",
|
||||
})
|
||||
})
|
||||
|
||||
it("parses error as TOO_MANY_REQUESTS error code", () => {
|
||||
const actual = parseSASRequestOtpError({
|
||||
status: "status",
|
||||
error: "error",
|
||||
errorCode: 10,
|
||||
databaseUUID: "9ffefefe-df0e-4229-9792-5ed31bef1db4",
|
||||
otpExpiration: "2021-09-01T00:00:00Z",
|
||||
})
|
||||
expect(actual).toEqual({
|
||||
errorCode: "TOO_MANY_REQUESTS",
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user