node-jet
Version:
Jet Realtime Message Bus for the Web. Daemon and Peer implementation.
75 lines (74 loc) • 2.48 kB
TypeScript
export declare const NO_ERROR_CODE = 1000;
export declare const PARSE_ERROR_CODE = -32600;
export declare const INVALID_REQUEST = -32600;
export declare const METHOD_NOT_FOUND = -32601;
export declare const INVALID_PARAMS_CODE = -32602;
export declare const INTERNAL_ERROR_CODE = -32603;
export declare const INVALID_PATH = -32604;
export declare const RESPONSE_TIMEOUT_CODE = -32001;
export declare const CONNECTION_ERROR_CODE = -32002;
export interface ErrorData {
url: string;
name: string;
details: string;
}
export interface JsonRPCError {
code: number;
message: string;
data?: ErrorData;
}
export declare class JSONRPCError extends Error implements JSONRPCError {
code: number;
message: string;
data?: ErrorData;
constructor(code: number, name: string, message: string, details?: string);
toString: () => string;
}
export declare class ParseError extends JSONRPCError {
constructor(details?: string);
}
export declare class InvalidParamError extends JSONRPCError {
constructor(name: string, message: string, details?: string);
}
export declare class NotFound extends InvalidParamError {
constructor(details?: string);
}
export declare class InvvalidCredentials extends InvalidParamError {
constructor(details?: string);
}
export declare class NotAuthorized extends InvalidParamError {
constructor(details?: string);
}
export declare class InvalidArgument extends InvalidParamError {
constructor(details?: string);
}
export declare class Occupied extends InvalidParamError {
constructor(details?: string);
}
export declare class FetchOnly extends InvalidParamError {
constructor(details?: string);
}
export declare class methodNotFoundError extends JSONRPCError {
constructor(details?: string);
}
export declare class invalidMethod extends JSONRPCError {
constructor(details?: string);
}
export declare class invalidState extends JSONRPCError {
constructor(details?: string);
}
export declare class invalidRequest extends JSONRPCError {
constructor(name?: string, message?: string, details?: string);
}
export declare class notAllowed extends invalidRequest {
constructor(details?: string);
}
export declare class ConnectionClosed extends JSONRPCError {
constructor(details?: string);
}
export declare class ConnectionInUse extends JSONRPCError {
constructor(err?: string);
}
export declare class PeerTimeout extends JSONRPCError {
constructor(details?: string);
}