huridocs/uwazi

View on GitHub
app/api/files/FileNotFound.ts

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
type StorageType = 'local' | 's3';

export class FileNotFound extends Error {
  filename: string;

  storage: StorageType;

  constructor(filename: string, storage: StorageType) {
    super(`File ${filename} not found in ${storage} storage`);
    this.filename = filename;
    this.storage = storage;
  }
}