A social knowledge tool for researchers built on ATProto
at main 349 B view raw
1// API error types for frontend client 2 3export interface ApiErrorResponse { 4 message: string; 5 code?: string; 6 details?: any; 7} 8 9export class ApiError extends Error { 10 constructor( 11 message: string, 12 public statusCode: number, 13 public code?: string, 14 public details?: any, 15 ) { 16 super(message); 17 this.name = 'ApiError'; 18 } 19}