Creates an instance of NotFoundError
.
The name of the resource that was not found. This will be included in the error message to provide context about what was missing.
The HTTP status code representing a not found error.
Optional
stackStatic
Optional
prepareOptional override for formatting stack traces
Static
stackSerializes the error details into an array of BaseServiceError
objects.
This method creates a structured error response that includes:
code
: 404 (Not Found)type
: "NotFoundError" (the name of the error class)message
: A user-friendly message indicating that the requested
resource was not found, including the specific resource name.An array containing the serialized error details.
Converts the error object into a standardized JSON structure.
errors
with the serialized errors.Static
capture
Represents a not found error, which is used to indicate that a requested resource could not be found on the server.
This class extends the
ClientError
class and is used to handle HTTP 404 Not Found errors.NotFoundError