mirror of
https://github.com/directus/directus.git
synced 2026-02-07 17:24:56 -05:00
* add tests to drive * add azure test runner * add gcs test runner * add s3 test runner * quick changes * Re-add npm run dev Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
24 lines
849 B
TypeScript
24 lines
849 B
TypeScript
import { RuntimeException } from 'node-exceptions';
|
|
|
|
export class InvalidConfig extends RuntimeException {
|
|
private constructor(message: string, status?: number, code?: string) {
|
|
super(message, status, code);
|
|
}
|
|
|
|
public static missingDiskName(): InvalidConfig {
|
|
return new this('Make sure to define a default disk name inside config file', 500, 'E_INVALID_CONFIG');
|
|
}
|
|
|
|
public static missingDiskConfig(name: string): InvalidConfig {
|
|
return new this(`Make sure to define config for ${name} disk`, 500, 'E_INVALID_CONFIG');
|
|
}
|
|
|
|
public static missingDiskDriver(name: string): InvalidConfig {
|
|
return new this(`Make sure to define driver for ${name} disk`, 500, 'E_INVALID_CONFIG');
|
|
}
|
|
|
|
public static duplicateDiskName(name: string): InvalidConfig {
|
|
return new this(`A disk named ${name} is already defined`, 500, 'E_INVALID_CONFIG');
|
|
}
|
|
}
|