@unkey/api
Version:
Developer-friendly & type-safe Typescript SDK specifically catered to leverage *@unkey/api* API.
45 lines • 1.71 kB
JavaScript
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod/v3";
import * as components from "../components/index.js";
import { UnkeyError } from "./unkeyerror.js";
/**
* Error response when the request is syntactically valid but cannot be processed due to semantic constraints or resource limitations. This occurs when:
*
* @remarks
* - A query exceeds execution time limits
* - A query uses more memory than allowed
* - A query scans too many rows
* - A query result exceeds size limits
*
* The request syntax is correct, but the operation cannot be completed due to business rules or resource constraints. Review the error details for specific limitations and adjust your request accordingly.
*/
export class UnprocessableEntityErrorResponse extends UnkeyError {
constructor(err, httpMeta) {
const message = "message" in err && typeof err.message === "string"
? err.message
: `API error occurred: ${JSON.stringify(err)}`;
super(message, httpMeta);
this.data$ = err;
this.meta = err.meta;
this.error = err.error;
this.name = "UnprocessableEntityErrorResponse";
}
}
/** @internal */
export const UnprocessableEntityErrorResponse$inboundSchema = z.object({
meta: components.Meta$inboundSchema,
error: components.BaseError$inboundSchema,
request$: z.instanceof(Request),
response$: z.instanceof(Response),
body$: z.string(),
})
.transform((v) => {
return new UnprocessableEntityErrorResponse(v, {
request: v.request$,
response: v.response$,
body: v.body$,
});
});
//# sourceMappingURL=unprocessableentityerrorresponse.js.map