Move error classes from services/ and file-operations/ into a new errors/ directory (authentication-error, server-version-mismatch-error, sync-reset-error, file-not-found-error), plus add file-already-exists-error and http-client-error. Update consts.ts and utils/* (await-all, create-client-id, hash, rate-limit, find-matching-file). Replace data-structures (locks, min-covered, event-listeners, fix-sized-cache) and add debugging utilities (in-memory-file-system, log-to-console, slow-web-socket-factory). Removes utils/create-promise.ts.
9 lines
216 B
TypeScript
9 lines
216 B
TypeScript
export class HttpClientError extends Error {
|
|
public constructor(
|
|
public readonly statusCode: number,
|
|
message: string
|
|
) {
|
|
super(message);
|
|
this.name = "HttpClientError";
|
|
}
|
|
}
|