kotauchisunsun/ts-express

View on GitHub
src/repository/user/UserDuplicatedError.ts

Summary

Maintainability
A
2 hrs
Test Coverage
B
83%
export class UserDuplicatedError implements Error {
  public name: string;
  public message: string;
  constructor() {
    this.name = "UserDuplicatedError";
    this.message = "User is duplicated.";
  }
  public toString(): string {
    return `${this.name}:${this.message}`;
  }
}