@grouparoo/core
Version:
The Grouparoo Core
55 lines (54 loc) • 2.32 kB
TypeScript
/// <reference types="node" />
import { ActionProcessor, Connection } from "actionhero";
import { Errors } from "..";
declare const namespace = "errors";
declare module "actionhero" {
interface ActionheroConfigInterface {
[namespace]: ReturnType<typeof DEFAULT[typeof namespace]>;
}
}
export declare const DEFAULT: {
errors: () => {
_toExpand: boolean;
reportUnknownActions: boolean;
serializers: {
servers: {
web: typeof GrouparooErrorSerializer;
websocket: typeof GrouparooErrorSerializer;
specHelper: typeof GrouparooErrorSerializer;
};
actionProcessor: (error: NodeJS.ErrnoException) => {
errorFields: {
error: string;
};
logLevel: import("actionhero").ActionheroLogLevel;
};
};
invalidParams: (data: ActionProcessor<any>, validationErrors: (string | Error)[]) => string | Error;
missingParams: (data: ActionProcessor<any>, missingParams: string[]) => string;
unknownAction: () => string;
unsupportedServerType: (data: ActionProcessor<any>) => string;
serverShuttingDown: () => string;
tooManyPendingActions: () => string;
genericError(data: ActionProcessor<any>, error: NodeJS.ErrnoException): Promise<NodeJS.ErrnoException>;
fileNotFound: () => string;
fileNotProvided: () => string;
fileReadError: (connection: Connection, error: NodeJS.ErrnoException) => string;
verbNotFound: (connection: Connection, verb: string) => string;
verbNotAllowed: (connection: Connection, verb: string) => string;
connectionRoomAndMessage: () => string;
connectionNotInRoom: (connection: Connection, room: string) => string;
connectionAlreadyInRoom: (connection: Connection, room: string) => string;
connectionRoomHasBeenDeleted: () => string;
connectionRoomNotExist: () => string;
connectionRoomExists: () => string;
connectionRoomRequired: () => string;
};
};
export declare function GrouparooErrorSerializer(error: Errors.GrouparooError): Record<string, string> | {
message: string;
code: string;
fields: string[];
sql: string;
};
export {};