immich-app/immich · info

[Deprecated]

Error message

[Deprecated] ${message}

What it means

deprecate is a logger helper that emits a warning prefixed with '[Deprecated]' for APIs or settings that will be removed. It does not throw; it informs developers at runtime that they are using something scheduled for removal.

Solutions

  1. Read the message body after '[Deprecated]' to identify what is deprecated
  2. Replace the deprecated config key/env var/API with its documented replacement
  3. Consult the Immich release notes/migration guide for the version you upgraded to
  4. Silence is not recommended — the item will eventually be removed and start hard-failing

Example fix

// before (config)
IMMICH_WEB_ROOT: /app/www
// after (use the renamed key per the deprecation message)
IMMICH_WEB_ROOT_DIR: /app/www  # example: renamed key from release notes
Defensive patterns

Strategy: validation

Validate before calling

const deprecatedKeys: Record<string, string> = {
  OLD_CONFIG_KEY: 'NEW_CONFIG_KEY',
};
for (const [oldKey, newKey] of Object.entries(deprecatedKeys)) {
  if (oldKey in config) throw new Error(`Replace ${oldKey} with ${newKey} before upgrading`);
}

Prevention

When it happens

Trigger: Any code path calling logger.deprecate(message) — e.g. detecting an obsolete config key, env var, or API parameter that still works but is superseded.

Common situations: Upgrading Immich to a version where a config option was renamed; passing deprecated CLI/env settings; calling a deprecated repository method from custom code.

Understand the failure class

Background: "is deprecated and will be removed" — deprecation warnings for old API names, keywords, and options, and how to migrate before the removal release — this error's family across 29 libraries.

Related errors


AI-assisted analysis of immich-app/immich@e55ac299a4 (2026-09-15). Data as JSON: /api/errors/81ea1a057e177196. Report an issue: GitHub.

Appendix: source

Thrown at server/src/repositories/logging.repository.ts:159

  log(message: string, ...details: LogDetails) {
    this.handleMessage(LogLevel.Log, message, details);
  }

  warn(message: string, ...details: LogDetails) {
    this.handleMessage(LogLevel.Warn, message, details);
  }

  error(message: string | Error, ...details: LogDetails) {
    this.handleMessage(LogLevel.Error, message, details);
  }

  fatal(message: string, ...details: LogDetails) {
    this.handleMessage(LogLevel.Fatal, message, details);
  }

  deprecate(message: string) {
    this.warn(`[Deprecated] ${message}`);
  }

  private handleFunction(level: LogLevel, message: LogFunction, details: LogDetails[]) {
    if (this.logger.isLevelEnabled(level)) {
      this.handleMessage(level, message(), details);
    }
  }

  private handleMessage(level: LogLevel, message: string | Error, details: LogDetails[]) {
    switch (level) {
      case LogLevel.Verbose: {
        this.logger.verbose(message, ...details);
        break;
      }

      case LogLevel.Debug: {
        this.logger.debug(message, ...details);
        break;

View on GitHub (pinned to e55ac299a4)