Fix disconnect during init logging
Summary: When a client disconnects while it's still initialising, we get a critical error. But this is expected to happen now and again, so adding a specific error for it, and handling it accordingly. It doesn't change the control flow, just the logging. Reviewed By: nikoant Differential Revision: D32794062 fbshipit-source-id: cf27fb9c345aa6369d338838a46e75a6b7afde41
This commit is contained in:
committed by
Facebook GitHub Bot
parent
9fc1d3cfb9
commit
b7a29ac0b3
@@ -34,6 +34,7 @@ export {
|
||||
CancelledPromiseError,
|
||||
UserUnauthorizedError,
|
||||
UserNotSignedInError,
|
||||
NoLongerConnectedToClientError,
|
||||
isConnectivityOrAuthError,
|
||||
isError,
|
||||
isAuthError,
|
||||
|
||||
@@ -60,6 +60,14 @@ export class UserNotSignedInError extends Error {
|
||||
name: 'UserNotSignedInError';
|
||||
}
|
||||
|
||||
export class NoLongerConnectedToClientError extends Error {
|
||||
constructor(msg: string = 'No longer connected to client.') {
|
||||
super(msg);
|
||||
this.name = 'NoLongerConnectedToClientError';
|
||||
}
|
||||
name: 'NoLongerConnectedToClientError';
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface Error {
|
||||
interaction?: unknown;
|
||||
|
||||
Reference in New Issue
Block a user