fix: improve logging of errors during public ip retrieval

This commit is contained in:
Viren070
2025-10-22 15:24:00 +01:00
parent cb3c14348a
commit d29d268b86
2 changed files with 4 additions and 3 deletions
+1 -1
View File
@@ -1129,7 +1129,7 @@ export class AIOStreams {
}
} catch (error) {
logger.warn(
`Failed to get ${label}, retrying... (${attempt}/${maxRetries})`
`Failed to get ${label}, retrying... (${attempt}/${maxRetries}), error=${error instanceof Error ? error.message : String(error)}`
);
}
}
+3 -2
View File
@@ -62,8 +62,6 @@ export class BuiltinProxy extends BaseProxy {
}
public override async getPublicIp(): Promise<string | null> {
logger.debug(`Validating ${this.config.credentials}`);
BuiltinProxy.validateAuth(this.config.credentials);
if (this.config.publicIp) {
@@ -83,6 +81,9 @@ export class BuiltinProxy extends BaseProxy {
});
if (!response.ok) {
logger.error(
`Failed to check public IP using AWS: ${response.status}: ${response.statusText}`
);
throw new Error(
`Failed to check public IP using AWS: ${response.status}: ${response.statusText}`
);