linshenkx/prompt-optimizer · warning · Error

Remote delete is not supported by this provider

Error message

Remote delete is not supported by this provider

What it means

Thrown by RemoteObjectStore.deleteBackup when the configured provider object store does not implement an optional delete method. The base class treats delete as optional capability; only some providers (S3, WebDAV, desktop IPC) supply it.

Source

Thrown at packages/ui/src/utils/remote-backup.ts:811

      .sort((a, b) => String(b.updatedAt || '').localeCompare(String(a.updatedAt || '')))
  }

  async uploadBackup(name: string, blob: Blob): Promise<RemoteBackupEntry> {
    const entry = await this.put(name, blob, { contentType: blob.type || BACKUP_MIME_TYPE })
    return {
      id: entry.path,
      name: fileNameOf(entry.path),
      sizeBytes: entry.sizeBytes ?? blob.size,
      updatedAt: entry.updatedAt,
    }
  }

  async downloadBackup(entry: RemoteBackupEntry): Promise<ArrayBuffer> {
    return this.get(entry.id)
  }

  async deleteBackup(entry: RemoteBackupEntry): Promise<void> {
    if (!this.delete) throw new Error('Remote delete is not supported by this provider')
    await this.delete(entry.id)
  }

  authorize?(): Promise<void>
}

class GoogleDriveRemoteObjectStore extends BaseRemoteObjectStore {
  provider: RemoteBackupProviderKind = 'google-drive'
  private accessTokenEntry: GoogleAccessTokenEntry | null = null
  private rootFolderId: string | null = null
  private pathIdCache = new Map<string, string>()

  constructor(private readonly config: Extract<RemoteBackupProviderConfig, { kind: 'google-drive' }>) {
    super()
  }

  async authorize(): Promise<void> {
    await this.ensureAccessToken()

View on GitHub (pinned to 3e677b1d9f)

Solutions

  1. Check 'delete' in store / typeof store.delete === 'function' before calling deleteBackup
  2. Hide or disable delete UI for providers lacking delete support
  3. Implement a delete method on your custom provider class

Example fix

// before
await store.deleteBackup(entry)
// after
if (typeof store.delete === 'function') {
  await store.deleteBackup(entry)
} else {
  showUnsupportedMessage()
}
Defensive patterns

Strategy: type-guard

Validate before calling

if (typeof store.delete !== 'function') { /* hide delete UI */ }

Type guard

const canDeleteBackup = (store: RemoteObjectStore): boolean => typeof (store as any).delete === 'function'

Prevention

When it happens

Trigger: Calling deleteBackup() on a RemoteObjectStore whose concrete class never assigns this.delete (e.g. a custom/minimal provider or a Google Drive store variant without delete support). downloadBackup works because get is mandatory.

Common situations: Custom provider implementations that only implement put/get/list; UI flows exposing a delete button for providers that cannot delete.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of linshenkx/prompt-optimizer@3e677b1d9f (2026-08-27). Data as JSON: /api/errors/6372baf115346331. Report an issue: GitHub.