Something went wrong. Try again.
Periodic backups of ATProto repos and blobs safekeeper.dummy.cafe
atproto backup
Something went wrong. Try again.
1.6 kB · 68 lines
TypeScript
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869// Errors// Register each new error in main.tsx's `.error({ ... })` call.
export class NotImplementedError extends Error { message = 'NOT_IMPLEMENTED' as const; status = 501 as const;}
export class NotAuthenticatedError extends Error { message = 'NOT_AUTHENTICATED' as const; status = 401 as const;}
export class NotAuthorizedError extends Error { message = 'NOT_AUTHORIZED' as const; status = 403 as const;}
export class BadRequestError extends Error { message = 'BAD_REQUEST' as const; status = 400 as const; details: string; constructor(details: string) { super(); this.details = details; }}
// A *resource* wasn't found (vs NotFoundError which is a missing route).export class ResourceNotFoundError extends Error { message = 'RESOURCE_NOT_FOUND' as const; status = 404 as const;}
export class AlreadyExistsError extends Error { message = 'ALREADY_EXISTS' as const; status = 409 as const; details: string; constructor(details: string) { super(); this.details = details; }}
export class KnownInternalServerError extends Error { message = 'KNOWN_INTERNAL_SERVER_ERROR' as const; status = 500 as const; internal: object; constructor(internal: object) { super(); this.internal = internal; }}
export class CouldNotResolveDidError extends Error { message = 'COULD_NOT_RESOLVE_DID' as const; status = 409 as const;}
export class UpstreamError extends Error { message = 'UPSTREAM_ERROR' as const; status = 502 as const; details: string; constructor(details: string) { super(); this.details = details; }}