Skip to content

Commit

Permalink
refactor: added getters for status and statusText
Browse files Browse the repository at this point in the history
  • Loading branch information
SachsenspieltCoding committed Feb 3, 2024
1 parent eefbe15 commit a242c10
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/errors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,14 @@ class RequestFailedError extends Error {
) {
super(`Request failed with status ${status} (${statusText})`);
}

getStatus(): number {
return this.status;
}

getStatusText(): string {
return this.statusText;
}
}

class PlanNotFoundError extends Error {
Expand Down

0 comments on commit a242c10

Please sign in to comment.