@cognigy/rest-api-client
Version:
Cognigy REST-Client
58 lines • 1.86 kB
JavaScript
/* Custom modules */
import { BaseError } from "./baseError";
import { RESOURCE_NOT_FOUND_ERROR } from "./codes";
import { HttpStatusCode } from "../helper/HttpStatusCode";
/**
* @openapi
* components:
* responses:
* NotFoundError:
* description: The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
* content:
* application/json:
* schema:
* type: object
* properties:
* type:
* type: string
* example: Not Found
* title:
* type: string
* example: Not Found Error
* status:
* type: number
* example: 404
* detail:
* type: string
* instance:
* type: string
* example: /v2.0/flows/5ce7c2d833ea1e04d7e6c432
* code:
* type: string
* example: 1000
* traceId:
* type: string
* example: api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f
* details:
* type: object
* example: {}
* logLevel:
* type: string
* example: error
*/
export class ResourceNotFoundError extends BaseError {
constructor(message, stack, meta, details, logLevel) {
super({
name: "Resource Not Found Error",
message,
code: RESOURCE_NOT_FOUND_ERROR,
httpStatusCode: HttpStatusCode.NOT_FOUND,
httpStatusText: "Not Found",
meta,
stack,
details,
logLevel,
});
}
}
//# sourceMappingURL=resourceNotFound.js.map