-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support detail error in handler
- Loading branch information
1 parent
317c690
commit bb7b3d7
Showing
15 changed files
with
807 additions
and
712 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
/** | ||
* Error thrown when a required file is not found. | ||
*/ | ||
export class FileNotFoundError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'FileNotFoundError'; | ||
} | ||
} | ||
|
||
/** | ||
* Error thrown when there is an issue modifying a file. | ||
*/ | ||
export class FileModificationError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'FileModificationError'; | ||
} | ||
} | ||
|
||
/** | ||
* Error thrown when parsing a response fails. | ||
*/ | ||
export class ResponseParsingError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'ResponseParsingError'; | ||
} | ||
} | ||
|
||
export class ResponseTagError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'ResponseTagError'; | ||
} | ||
} | ||
|
||
export class ModelTimeoutError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'ModelTimeoutError'; | ||
} | ||
} | ||
|
||
export class TemporaryServiceUnavailableError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'TemporaryServiceUnavailableError'; | ||
} | ||
} | ||
|
||
export class RateLimitExceededError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'RateLimitExceededError'; | ||
} | ||
} | ||
|
||
export class MissingConfigurationError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'MissingConfigurationError'; | ||
} | ||
} | ||
|
||
export class InvalidParameterError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'InvalidParameterError'; | ||
} | ||
} | ||
|
||
export class FileWriteError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'FileWriteError'; | ||
} | ||
} | ||
|
||
export class ParsingError extends Error { | ||
constructor(message: string) { | ||
super(message); | ||
this.name = 'ParsingError'; | ||
} | ||
} | ||
|
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
Oops, something went wrong.