type SuccessResponse = { success: true; body: Body; }; export type ErrorMessage = string; type ErrorResponse = { success: false; message: ErrorMessage; }; export type BaseResponse = SuccessResponse | ErrorResponse;