mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
14 lines
361 B
TypeScript
14 lines
361 B
TypeScript
import { createError, ErrorCode } from '../index.js';
|
|
|
|
export interface InvalidQueryErrorExtensions {
|
|
reason: string;
|
|
}
|
|
|
|
export const messageConstructor = ({ reason }: InvalidQueryErrorExtensions) => `Invalid query. ${reason}.`;
|
|
|
|
export const InvalidQueryError = createError<InvalidQueryErrorExtensions>(
|
|
ErrorCode.InvalidQuery,
|
|
messageConstructor,
|
|
400,
|
|
);
|