Something went wrong. Try again.
A lexicon-driven AppView for ATProto.
Something went wrong. Try again.
1.2 kB · 54 lines
TypeScript
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455export class HappyViewError extends Error { constructor(message: string) { super(message); this.name = "HappyViewError"; }}
export class ApiError extends HappyViewError { readonly status: number; readonly body: unknown;
constructor(message: string, status: number, body?: unknown) { super(message); this.name = "ApiError"; this.status = status; this.body = body; }}
export class AuthenticationError extends HappyViewError { readonly status: number;
constructor(message: string, status: number = 401) { super(message); this.name = "AuthenticationError"; this.status = status; }}
export class InvalidStateError extends HappyViewError { constructor(message: string) { super(message); this.name = "InvalidStateError"; }}
export class TokenExchangeError extends HappyViewError { readonly status: number; readonly body: string;
constructor(message: string, status: number, body: string) { super(message); this.name = "TokenExchangeError"; this.status = status; this.body = body; }}
export class ResolutionError extends HappyViewError { constructor(message: string) { super(message); this.name = "ResolutionError"; }}