feat(passkey): error codes in passkey client (#3966)

Co-authored-by: KinfeMichael Tariku <65047246+Kinfe123@users.noreply.github.com>
Co-authored-by: Bereket Engida <86073083+Bekacru@users.noreply.github.com>
This commit is contained in:
Fraol Lemecha
2025-09-09 21:56:33 +03:00
committed by GitHub
parent bd0ce60165
commit 4b2f5b0a8e

View File

@@ -65,6 +65,7 @@ export const getPasskeyActions = (
return {
data: null,
error: {
code: "AUTH_CANCELLED",
message: "auth cancelled",
status: 400,
statusText: "BAD_REQUEST",
@@ -140,6 +141,7 @@ export const getPasskeyActions = (
return {
data: null,
error: {
code: e.code,
message: "previously registered",
status: 400,
statusText: "BAD_REQUEST",
@@ -150,6 +152,7 @@ export const getPasskeyActions = (
return {
data: null,
error: {
code: e.code,
message: "registration cancelled",
status: 400,
statusText: "BAD_REQUEST",
@@ -159,6 +162,7 @@ export const getPasskeyActions = (
return {
data: null,
error: {
code: e.code,
message: e.message,
status: 400,
statusText: "BAD_REQUEST",
@@ -168,6 +172,7 @@ export const getPasskeyActions = (
return {
data: null,
error: {
code: "UNKNOWN_ERROR",
message: e instanceof Error ? e.message : "unknown error",
status: 500,
statusText: "INTERNAL_SERVER_ERROR",