Skip to content

Commit

Permalink
Remove ApiError::getMessage, ApiError::getField, and ApiError::getSta…
Browse files Browse the repository at this point in the history
…tusCode.

The values returned by these functions are available as (public) properties.
  • Loading branch information
Pimm committed Sep 10, 2024
1 parent a8d0ed2 commit 905d289
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions src/errors/ApiError.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,36 +27,6 @@ export default class ApiError extends Error {
Object.defineProperty(this, 'message', { enumerable: true });
}

/**
* Get the error message
*
* @since 3.0.0
* @deprecated Use `error.message` instead.
*/
public getMessage(): string {
return this.message;
}

/**
* Get the field name that contains an error
*
* @since 3.0.0
* @deprecated Use `error.field` instead.
*/
public getField(): Maybe<string> {
return this.field;
}

/**
* Get the API status code
*
* @since 3.0.0
* @deprecated Use `error.statusCode` instead.
*/
public getStatusCode(): Maybe<number> {
return this.statusCode;
}

/**
* Get the documentation URL
*
Expand Down

0 comments on commit 905d289

Please sign in to comment.