import { ReactElement } from 'react'; export interface CustomError { status: number; title: string; subTitle: string | ReactElement; } export const INVALID_CONFIG_ERROR: CustomError = { status: 500, title: 'Invalid Config!', subTitle: (

Please provide correct config in gitprofile.config.ts.

), }; export const setTooManyRequestError = (resetTime: string): CustomError => { return { status: 429, title: 'Too Many Requests!', subTitle: (

Oh no, you hit the{' '} rate limit ! Try again later{` ${resetTime}`}.

), }; }; export const INVALID_GITHUB_USERNAME_ERROR: CustomError = { status: 404, title: 'Invalid GitHub Username!', subTitle: (

Please provide correct github username in{' '} gitprofile.config.ts.

), }; export const GENERIC_ERROR: CustomError = { status: 500, title: 'Oops!!', subTitle: 'Something went wrong.', };