@codacy/api-typescript
Advanced tools
Comparing version 1.0.14 to 1.0.15
@@ -6,4 +6,4 @@ import * as Models from './models'; | ||
import { HttpOperationResponse } from '@azure/ms-rest-js'; | ||
export declare type ErrorType = 'ApiError' | 'BadRequest' | 'Unauthorized' | 'Forbidden' | 'NotFound' | 'Conflict' | 'InternalServerError' | 'BadGateway'; | ||
export declare type ApiErrorUnion = Models.BadRequest | Models.Forbidden | Models.Unauthorized | Models.PaymentRequired | Models.NotFound | Models.Conflict | Models.InternalServerError | Models.BadGateway; | ||
export declare type ErrorType = 'ApiError' | 'BadRequest' | 'Unauthorized' | 'Forbidden' | 'NotFound' | 'Conflict' | 'InternalServerError' | 'BadGateway' | 'UnprocessableEntity'; | ||
export declare type ApiErrorUnion = Models.BadRequest | Models.Forbidden | Models.Unauthorized | Models.PaymentRequired | Models.NotFound | Models.Conflict | Models.InternalServerError | Models.BadGateway | Models.UnprocessableEntity; | ||
export declare class BaseApiError extends Error { | ||
@@ -47,2 +47,5 @@ errorType: string; | ||
} | ||
export declare class UnprocessableEntityApiError extends BaseApiError { | ||
constructor(error: ApiErrorUnion, response?: HttpOperationResponse, exception?: Error); | ||
} | ||
export declare class InternalServerApiError extends BaseApiError { | ||
@@ -49,0 +52,0 @@ constructor(error: ApiErrorUnion, response?: HttpOperationResponse, exception?: Error); |
@@ -132,2 +132,13 @@ import { __assign, __awaiter, __extends, __generator, __spreadArrays } from "tslib"; | ||
export { ConflictApiError }; | ||
var UnprocessableEntityApiError = /** @class */ (function (_super) { | ||
__extends(UnprocessableEntityApiError, _super); | ||
function UnprocessableEntityApiError(error, response, exception) { | ||
var _this = _super.call(this, error, response, exception) || this; | ||
_this.name = 'UnprocessableEntityApiError'; | ||
Object.setPrototypeOf(_this, UnprocessableEntityApiError.prototype); | ||
return _this; | ||
} | ||
return UnprocessableEntityApiError; | ||
}(BaseApiError)); | ||
export { UnprocessableEntityApiError }; | ||
var InternalServerApiError = /** @class */ (function (_super) { | ||
@@ -211,2 +222,4 @@ __extends(InternalServerApiError, _super); | ||
throw new ConflictApiError(exception, result); | ||
case 'UnprocessableEntity': | ||
throw new UnprocessableEntityApiError(exception, result); | ||
case 'InternalServerError': | ||
@@ -213,0 +226,0 @@ throw new InternalServerApiError(exception, result); |
{ | ||
"name": "@codacy/api-typescript", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "Codacy API client for Typescript", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/codacy/codacy-api-typescript#readme", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
873524
17079