@cognigy/rest-api-client
Version:
Cognigy REST-Client
59 lines • 1.95 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.UnauthorizedError = void 0;
/* Custom modules */
const baseError_1 = require("./baseError");
const ErrorCode_1 = require("./ErrorCode");
const HttpStatusCode_1 = require("../helper/HttpStatusCode");
/**
* @openapi
* components:
* responses:
* UnauthorizedError:
* description: The request has not been applied because it lacks valid authentication credentials for the target resource.
* content:
* application/json:
* schema:
* type: object
* properties:
* type:
* type: string
* example: Unauthorized
* title:
* type: string
* example: Unauthorized Error
* status:
* type: number
* example: 401
* detail:
* type: string
* instance:
* type: string
* example: /v2.0/flows/5ce7c2d833ea1e04d7e6c432
* code:
* type: string
* example: 401
* traceId:
* type: string
* example: api--f84324f4-98eb-4f02-abdd-375a2e6c3c1f
* details:
* type: object
* example: {}
*/
class UnauthorizedError extends baseError_1.BaseError {
constructor(message, stack, meta, details, logLevel) {
super({
name: "Unauthorized Error",
message,
code: ErrorCode_1.ErrorCode.UNAUTHORIZED_ERROR,
httpStatusCode: HttpStatusCode_1.HttpStatusCode.UNAUTHORIZED,
httpStatusText: "Unauthorized",
meta,
stack,
details,
logLevel,
});
}
}
exports.UnauthorizedError = UnauthorizedError;
//# sourceMappingURL=UnauthorizedError.js.map