Add companion logging
Summary: Add top-level error logging to flipper-server. Use the top-level logging mechanism in flipper-companion. Reviewed By: lblasa Differential Revision: D36252218 fbshipit-source-id: 58d22b3b9bd51e597b5250478640f54d10277861
This commit is contained in:
committed by
Facebook GitHub Bot
parent
e218b79de2
commit
98dde53cda
@@ -41,6 +41,8 @@ export {
|
||||
UserUnauthorizedError,
|
||||
UserNotSignedInError,
|
||||
NoLongerConnectedToClientError,
|
||||
UserError,
|
||||
SystemError,
|
||||
isConnectivityOrAuthError,
|
||||
isError,
|
||||
isAuthError,
|
||||
|
||||
@@ -30,6 +30,24 @@ export function isConnectivityOrAuthError(
|
||||
);
|
||||
}
|
||||
|
||||
export class SystemError extends Error {
|
||||
name = 'SystemError';
|
||||
readonly context?: unknown;
|
||||
constructor(msg: string, ...args: unknown[]) {
|
||||
super(msg);
|
||||
this.context = args;
|
||||
}
|
||||
}
|
||||
|
||||
export class UserError extends Error {
|
||||
name = 'UserError';
|
||||
readonly context?: unknown;
|
||||
constructor(msg: string, ...args: unknown[]) {
|
||||
super(msg);
|
||||
this.context = args;
|
||||
}
|
||||
}
|
||||
|
||||
export class UnableToExtractClientQueryError extends Error {
|
||||
constructor(msg: string) {
|
||||
super(msg);
|
||||
|
||||
Reference in New Issue
Block a user