Skip to content

Commit

Permalink
chore(errors): removed unneeded properties
Browse files Browse the repository at this point in the history
  • Loading branch information
seaerchin committed Dec 12, 2022
1 parent c29b531 commit 3934018
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 24 deletions.
5 changes: 1 addition & 4 deletions src/errors/EmptyStringError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ export default class EmptyStringError extends BaseIsomerError {
constructor(
message = "An empty string was provided for a method that requires a non-empty string"
) {
super()
Error.captureStackTrace(this, this.constructor)
this.name = this.constructor.name
this.message = message
super(500, message)
}
}
5 changes: 1 addition & 4 deletions src/errors/MissingResourceRoomError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { NotFoundError } from "./NotFoundError"

export default class MissingResourceRoomError extends NotFoundError {
constructor(message = "No resource room exists for the site") {
super()
Error.captureStackTrace(this, this.constructor)
this.name = this.constructor.name
this.message = message
super(message)
}
}
5 changes: 1 addition & 4 deletions src/errors/MissingSiteError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { NotFoundError } from "./NotFoundError"

export default class MissingSiteError extends NotFoundError {
constructor(message = "The site could not be found in Isomer") {
super()
Error.captureStackTrace(this, this.constructor)
this.name = this.constructor.name
this.message = message
super(message)
}
}
5 changes: 1 addition & 4 deletions src/errors/MissingUserEmailError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { NotFoundError } from "./NotFoundError"

export default class MissingUserEmailError extends NotFoundError {
constructor(message = "No email exists for the specified user!") {
super()
Error.captureStackTrace(this, this.constructor)
this.name = this.constructor.name
this.message = message
super(message)
}
}
5 changes: 1 addition & 4 deletions src/errors/MissingUserError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { NotFoundError } from "./NotFoundError"

export default class MissingUserError extends NotFoundError {
constructor(message = "The user could not be found in Isomer") {
super()
Error.captureStackTrace(this, this.constructor)
this.name = this.constructor.name
this.message = message
super(message)
}
}
5 changes: 1 addition & 4 deletions src/errors/RequestNotFoundError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@ import { NotFoundError } from "./NotFoundError"

export default class RequestNotFoundError extends NotFoundError {
constructor(message = "The specified review request could not be found!") {
super()
Error.captureStackTrace(this, this.constructor)
this.name = this.constructor.name
this.message = message
super(message)
}
}

0 comments on commit 3934018

Please sign in to comment.