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:
@@ -17,7 +17,16 @@ const inputSchema = z.object({
|
||||
})
|
||||
|
||||
const outputSchema = z.object({
|
||||
status: z.string(), // TODO: Change to enum
|
||||
status: z.enum([
|
||||
"VERIFIED",
|
||||
"ABUSED",
|
||||
"EXPIRED",
|
||||
"PENDING",
|
||||
"RETRY",
|
||||
"SENT",
|
||||
"NULL",
|
||||
"NOTSENT",
|
||||
]),
|
||||
referenceId: z.string().uuid(),
|
||||
databaseUUID: z.string().uuid().optional(),
|
||||
})
|
||||
@@ -29,7 +38,6 @@ export const verifyOtp = protectedProcedure
|
||||
const sasAuthToken = getSasToken()
|
||||
|
||||
if (!sasAuthToken) {
|
||||
// TODO: Should we verify that the SAS token isn't expired?
|
||||
throw createError("AUTH_TOKEN_NOT_FOUND")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user