@auth0/nextjs-auth0
Version:
Auth0 Next.js SDK
75 lines (74 loc) • 2.04 kB
TypeScript
import { SdkError } from "./sdk-error.js";
/**
* Error class representing a connect account request error.
*/
export declare class MyAccountApiError extends SdkError {
name: string;
code: string;
type: string;
title: string;
detail: string;
status: number;
validationErrors?: Array<{
/**
* A human-readable description of the specific error. Required.
*/
detail: string;
/**
* The name of the invalid parameter. Optional.
*/
field?: string;
/**
* A JSON Pointer that points to the exact location of the error in a JSON document being validated. Optional.
*/
pointer?: string;
/**
* Specifies the source of the error (e.g., body, query, or header in an HTML message). Optional.
*/
source?: string;
}>;
constructor({ type, title, detail, status, validationErrors }: {
type: string;
title: string;
detail: string;
status: number;
validationErrors?: Array<{
detail: string;
field?: string;
pointer?: string;
source?: string;
}>;
});
}
/**
* Enum representing error codes related to the connect account flow.
*/
export declare enum ConnectAccountErrorCodes {
/**
* The session is missing.
*/
MISSING_SESSION = "missing_session",
/**
* Failed to initiate the connect account flow.
*/
FAILED_TO_INITIATE = "failed_to_initiate",
/**
* Failed to complete the connect account flow.
*/
FAILED_TO_COMPLETE = "failed_to_complete"
}
/**
* Error class representing a connect account error.
*/
export declare class ConnectAccountError extends SdkError {
/**
* The error code associated with the connect account error.
*/
code: string;
cause?: MyAccountApiError;
constructor({ code, message, cause }: {
code: string;
message: string;
cause?: MyAccountApiError;
});
}