mirror of
https://github.com/immich-app/immich.git
synced 2026-03-22 15:39:20 +03:00
chore: eslint 10 (#26490)
This commit is contained in:
@@ -185,7 +185,7 @@ const getEnv = (): EnvData => {
|
||||
try {
|
||||
redisConfig = JSON.parse(Buffer.from(redisUrl.slice(10), 'base64').toString());
|
||||
} catch (error) {
|
||||
throw new Error(`Failed to decode redis options: ${error}`);
|
||||
throw new Error('Failed to decode redis options', { cause: error });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ export class ServerInfoRepository {
|
||||
|
||||
return response.json();
|
||||
} catch (error) {
|
||||
throw new Error(`Failed to fetch GitHub release: ${error}`);
|
||||
throw new Error('Failed to fetch GitHub release', { cause: error });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ export class MetadataService extends BaseService {
|
||||
this.logger.log(`Initialized local reverse geocoder`);
|
||||
} catch (error: Error | any) {
|
||||
this.logger.error(`Unable to initialize reverse geocoding: ${error}`, error?.stack);
|
||||
throw new Error(`Metadata service init failed`);
|
||||
throw new Error('Metadata service init failed', { cause: error });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ export class NotificationAdminService extends BaseService {
|
||||
async getTemplate(name: EmailTemplate, customTemplate: string) {
|
||||
const { server, templates } = await this.getConfig({ withCache: false });
|
||||
|
||||
let templateResponse = '';
|
||||
let templateResponse: string;
|
||||
|
||||
switch (name) {
|
||||
case EmailTemplate.WELCOME: {
|
||||
|
||||
@@ -134,7 +134,7 @@ export class NotificationService extends BaseService {
|
||||
}
|
||||
} catch (error: Error | any) {
|
||||
this.logger.error(`Failed to validate SMTP configuration: ${error}`, error?.stack);
|
||||
throw new Error(`Invalid SMTP configuration: ${error}`);
|
||||
throw new Error('Invalid SMTP configuration', { cause: error });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ export class StorageTemplateService extends BaseService {
|
||||
});
|
||||
} catch (error) {
|
||||
this.logger.warn(`Storage template validation failed: ${JSON.stringify(error)}`);
|
||||
throw new Error(`Invalid storage template: ${error}`);
|
||||
throw new Error('Invalid storage template', { cause: error });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user