Skip to content

Errors: UseRouteInvalidError

An error thrown when there is a mismatch between an expected route and the one actually used.

Extends

  • Error

Constructors

Constructor

ts
new UseRouteInvalidError(routeName, actualRouteName): UseRouteInvalidError;

Constructs a new UseRouteInvalidError instance with a message that specifies both the given and expected route names. This detailed error message aids in quickly identifying and resolving mismatches in route usage.

Parameters

ParameterTypeDescription
routeNamestringThe route name that was incorrectly used.
actualRouteNamestringThe expected route name that should have been used.

Returns

UseRouteInvalidError

Overrides

ts
Error.constructor

Methods

isError()

ts
static isError(error): error is Error;

Indicates whether the argument provided is a built-in Error instance or not.

Parameters

ParameterType
errorunknown

Returns

error is Error

Inherited from

ts
Error.isError

Properties

PropertyTypeInherited from
cause?unknownError.cause
messagestringError.message
namestringError.name
stack?stringError.stack