-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe91339
commit 770e968
Showing
6 changed files
with
53 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/hooks/use-merged-infinite-queries/use-merged-infinite-queries-error.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export class UseMergedInfiniteQueriesError extends Error { | ||
errors: Array<Error>; | ||
constructor(message: string, errors: Array<Error>, options?: ErrorOptions) { | ||
super(message, options); | ||
this.errors = errors; | ||
this.name = 'UseMergedInfiniteQueriesError'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,19 @@ | ||
import { type ZodIssue } from 'zod'; | ||
|
||
export class RequestError extends Error { | ||
status: number; | ||
constructor(message: string, status: number, options?: ErrorOptions) { | ||
validationErrors: Array<ZodIssue> | undefined; | ||
constructor( | ||
message: string, | ||
status: number, | ||
validationErrors?: Array<ZodIssue>, | ||
options?: ErrorOptions | ||
) { | ||
super(message, options); | ||
this.status = status; | ||
if (validationErrors?.length) { | ||
this.validationErrors = validationErrors; | ||
} | ||
this.name = 'RequestError'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters