@vercel/sdk
Version:
<p align="center"> <a href="https://vercel.com"> <img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96"> <h3 align="center">Vercel</h3> </a> <p align="center">Develop. Preview. Ship.</p> </p>
51 lines • 1.41 kB
TypeScript
import * as z from "zod/v3";
import { Result as SafeParseResult } from "../types/fp.js";
import { SDKValidationError } from "./sdkvalidationerror.js";
import { VercelError } from "./vercelerror.js";
/**
* Error details.
*/
export type ErrorT = {
/**
* Stable machine-readable error code.
*/
code: string;
/**
* Human-readable error message.
*/
message: string;
additionalProperties?: {
[k: string]: any;
} | undefined;
};
/**
* Error response returned by a Connect API operation.
*/
export type ConnectErrorData = {
/**
* Error details.
*/
error: ErrorT;
};
/**
* Error response returned by a Connect API operation.
*/
export declare class ConnectError extends VercelError {
/**
* Error details.
*/
error: ErrorT;
/** The original data that was passed to this error instance. */
data$: ConnectErrorData;
constructor(err: ConnectErrorData, httpMeta: {
response: Response;
request: Request;
body: string;
});
}
/** @internal */
export declare const ErrorT$inboundSchema: z.ZodType<ErrorT, z.ZodTypeDef, unknown>;
export declare function errorFromJSON(jsonString: string): SafeParseResult<ErrorT, SDKValidationError>;
/** @internal */
export declare const ConnectError$inboundSchema: z.ZodType<ConnectError, z.ZodTypeDef, unknown>;
//# sourceMappingURL=connecterror.d.ts.map