An invalid argument was encountered.
const InvalidArgumentError = require('@node-oauth/oauth2-server/lib/errors/invalid-argument-error');
Note
This error indicates that the module is used incorrectly (i.e., there is a programming error) and should never be seen because of external errors (like invalid data sent by a client).
Instantiates an InvalidArgumentError.
Arguments:
| Name | Type | Description |
|---|---|---|
| [message=undefined] | String|Error | See :ref:`OAuthError#constructor`. |
| [properties={}] | Object | See :ref:`OAuthError#constructor`. |
| [properties.code=500] | Object | See :ref:`OAuthError#constructor`. |
| [properties.name='invalid_argument'] | String | The error name used in responses generated from this error. |
Return value:
A new instance of InvalidArgumentError.
Remarks:
const err = new InvalidArgumentError(); // err.message === 'Internal Server Error' // err.code === 500 // err.name === 'invalid_argument'
See :ref:`OAuthError#message <OAuthError#message>`.
Typically 500. See :ref:`OAuthError#code <OAuthError#code>`.
See :ref:`OAuthError#inner <OAuthError#inner>`.
Typically 'invalid_argument'. See :ref:`OAuthError#name <OAuthError#name>`.