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(
73
73
) ;
74
74
}
75
75
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
-
81
76
// Require valid status codes, otherwise can assume feedback was not sent successfully
82
77
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
+ }
83
83
throw new Error ( 'Unable to send Feedback. Invalid response from server.' ) ;
84
84
}
85
85
You can’t perform that action at this time.
0 commit comments