export default class GenericError extends Error {
  public status: number;

  constructor(info: {
    name: string;
    message: string;
    cause?: string;
    status?: number;
  }) {
    super();
    this.name = info.name;
    this.status = info.status ?? 400;
    this.message = info.message;
    this.cause = info.cause;
  }
}
