File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -875,18 +875,15 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
875875 public sendEnvelope ( envelope : Envelope ) : PromiseLike < TransportMakeRequestResponse > {
876876 this . emit ( 'beforeEnvelope' , envelope ) ;
877877
878- if ( ! this . _isEnabled ( ) || ! this . _transport ) {
879- DEBUG_BUILD && debug . error ( 'Transport disabled' ) ;
880- return resolvedSyncPromise ( { } ) ;
881- }
882-
883- return this . _transport . send ( envelope ) . then (
884- response => response ,
885- reason => {
878+ if ( this . _isEnabled ( ) && this . _transport ) {
879+ return this . _transport . send ( envelope ) . then ( null , reason => {
886880 DEBUG_BUILD && debug . error ( 'Error while sending envelope:' , reason ) ;
887881 return { } ;
888- } ,
889- ) ;
882+ } ) ;
883+ }
884+
885+ DEBUG_BUILD && debug . error ( 'Transport disabled' ) ;
886+ return resolvedSyncPromise ( { } ) ;
890887 }
891888
892889 /* eslint-enable @typescript-eslint/unified-signatures */
You can’t perform that action at this time.
0 commit comments