From 454a37cf4a45ce4a2b69467fa4582afe41519a50 Mon Sep 17 00:00:00 2001 From: George Fu Date: Fri, 24 May 2024 16:15:19 +0000 Subject: [PATCH] formatting --- .../property-provider/src/CredentialsProviderError.ts | 8 ++++++-- packages/property-provider/src/ProviderError.ts | 2 +- packages/property-provider/src/TokenProviderError.ts | 7 +++++++ 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/packages/property-provider/src/CredentialsProviderError.ts b/packages/property-provider/src/CredentialsProviderError.ts index 62a2dfcc020..75067619f95 100644 --- a/packages/property-provider/src/CredentialsProviderError.ts +++ b/packages/property-provider/src/CredentialsProviderError.ts @@ -1,5 +1,3 @@ -import { Logger } from "@smithy/types"; - import { ProviderError, ProviderErrorOptionsType } from "./ProviderError"; /** @@ -17,17 +15,23 @@ export class CredentialsProviderError extends ProviderError { name = "CredentialsProviderError"; /** + * @override * @deprecated constructor should be given a logger. */ public constructor(message: string); /** + * @override * @deprecated constructor should be given a logger. */ public constructor(message: string, tryNextLink: boolean | undefined); /** + * @override * This signature is preferred for logging capability. */ public constructor(message: string, options: ProviderErrorOptionsType); + /** + * @override + */ public constructor(message: string, options: boolean | ProviderErrorOptionsType = true) { super(message, options as ProviderErrorOptionsType); Object.setPrototypeOf(this, CredentialsProviderError.prototype); diff --git a/packages/property-provider/src/ProviderError.ts b/packages/property-provider/src/ProviderError.ts index 546e9458eee..f239daf5c90 100644 --- a/packages/property-provider/src/ProviderError.ts +++ b/packages/property-provider/src/ProviderError.ts @@ -49,7 +49,7 @@ export class ProviderError extends Error { super(message); this.tryNextLink = tryNextLink; Object.setPrototypeOf(this, ProviderError.prototype); - logger?.debug?.(`${this.constructor?.name} ${tryNextLink ? "->" : "(!)"} ${message}`); + logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); } /** diff --git a/packages/property-provider/src/TokenProviderError.ts b/packages/property-provider/src/TokenProviderError.ts index 9d3ddcf763f..6799830c7f0 100644 --- a/packages/property-provider/src/TokenProviderError.ts +++ b/packages/property-provider/src/TokenProviderError.ts @@ -13,18 +13,25 @@ import { ProviderError, ProviderErrorOptionsType } from "./ProviderError"; */ export class TokenProviderError extends ProviderError { name = "TokenProviderError"; + /** + * @override * @deprecated constructor should be given a logger. */ public constructor(message: string); /** + * @override * @deprecated constructor should be given a logger. */ public constructor(message: string, tryNextLink: boolean | undefined); /** + * @override * This signature is preferred for logging capability. */ public constructor(message: string, options: ProviderErrorOptionsType); + /** + * @override + */ public constructor(message: string, options: boolean | ProviderErrorOptionsType = true) { super(message, options as ProviderErrorOptionsType); Object.setPrototypeOf(this, TokenProviderError.prototype);