There was an error while loading. Please reload this page.
error
EndpointOptions
1 parent d2cc324 commit cc37eaeCopy full SHA for cc37eae
2 files changed
src/endpoint.ts
@@ -32,6 +32,10 @@ export interface EndpointOptions {
32
* Query Schema
33
*/
34
query?: StandardSchemaV1;
35
+ /**
36
+ * Error Schema
37
+ */
38
+ error?: StandardSchemaV1;
39
/**
40
* If true headers will be required to be passed in the context
41
src/utils.ts
@@ -53,7 +53,7 @@ export async function getBody(request: Request) {
53
return await request.text();
54
}
55
56
-export function isAPIError(error: any) {
+export function isAPIError(error: any): error is APIError {
57
return error instanceof APIError || error?.name === "APIError";
58
59
0 commit comments