File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
packages/feedback/src/core Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -73,13 +73,13 @@ export async function sendFeedback(
7373 ) ;
7474 }
7575
76- // TODO (v8): we can remove this guard once transport.send's type signature doesn't include void anymore
77- if ( ! response ) {
78- throw new Error ( 'Unable to send Feedback' ) ;
79- }
80-
8176 // Require valid status codes, otherwise can assume feedback was not sent successfully
8277 if ( typeof response . statusCode === 'number' && ( response . statusCode < 200 || response . statusCode >= 300 ) ) {
78+ if ( response . statusCode === 0 ) {
79+ throw new Error (
80+ 'Unable to send Feedback. This is because of network issues, or because you are using an ad-blocker.' ,
81+ ) ;
82+ }
8383 throw new Error ( 'Unable to send Feedback. Invalid response from server.' ) ;
8484 }
8585
You can’t perform that action at this time.
0 commit comments