UNPKG

botframework-connector

Version:

Bot Connector is autorest generated connector client.

39 lines (38 loc) 1.58 kB
/** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ import { IStatusCodeError } from 'botframework-schema'; export declare type StatusCode = number; /** * General `AuthenticationError` class to represent an Authentication error with a Code Status. */ export declare class AuthenticationError extends Error implements IStatusCodeError { readonly statusCode: StatusCode; /** * Initializes a new instance of the [AuthenticationError](xref:botframework-connector.AuthenticationError) class. * * @param message The Error message. * @param statusCode The `StatusCode` number to use. */ constructor(message: string, statusCode: StatusCode); /** * Corroborates that the error is of type [IStatusCodeError](xref:botframework-schema.IStatusCodeError). * * @param err The error to validate. * @returns If `err` is an [IStatusCodeError](xref:botframework-schema.IStatusCodeError), the result is true; otherwise false. */ static isStatusCodeError(err: any): err is IStatusCodeError; /** * Used to determine a status code from the error message for non-`IStatusCodeError`'s. * * @param err The error thrown, used to determine an appropriate status code. * @returns The error message to be sent as a response. */ static determineStatusCodeAndBuildMessage(err: any): string; /** * @private */ private static determineStatusCode; } //# sourceMappingURL=authenticationError.d.ts.map