Turn on custom-error-definition and name the custom errors
This commit is contained in:
+6
-1
@@ -36,7 +36,12 @@ const failureComment = (failures: ProfileFailure[]): string =>
|
||||
// The `fetch` subset the reviewer posts through, which tests replace.
|
||||
export type Fetcher = (url: string, init: RequestInit) => Promise<Response>;
|
||||
|
||||
class GiteaRequestError extends Error {}
|
||||
class GiteaRequestError extends Error {
|
||||
constructor(message: string, options?: ErrorOptions) {
|
||||
super(message, options);
|
||||
this.name = "GiteaRequestError";
|
||||
}
|
||||
}
|
||||
|
||||
function parseAnchors(text: string, sourcePath: string): Anchor[] {
|
||||
const entries: unknown = JSON.parse(text);
|
||||
|
||||
Reference in New Issue
Block a user