You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Received invalid response from authorization service (HTTP 200). Response could not be parsed as valid JSON. If this issue persists, please contact support at https://help.shopify.com',
77
79
)
78
80
})
79
81
80
-
test('when the response is empty, throw an error',async()=>{
82
+
test('when the response is empty, throw an error with empty body message',async()=>{
'Received invalid response from authorization service (HTTP 200). Received empty response body. If this issue persists, please contact support at https://help.shopify.com',
94
+
)
95
+
})
96
+
97
+
test('when the response is HTML instead of JSON, throw an error with HTML detection',async()=>{
'Received invalid response from authorization service (HTTP 404). The request may be malformed or unauthorized. Received HTML instead of JSON - the service endpoint may have changed. If this issue persists, please contact support at https://help.shopify.com',
110
+
)
111
+
})
112
+
113
+
test('when the server returns a 500 error with non-JSON response, throw an error with server issue message',async()=>{
114
+
// Given
115
+
constresponse=newResponse('Internal Server Error')
'Received invalid response from authorization service (HTTP 500). The service may be experiencing issues. Response could not be parsed as valid JSON. If this issue persists, please contact support at https://help.shopify.com',
125
+
)
126
+
})
127
+
128
+
test('when response.text() fails, throw an error about network/streaming issue',async()=>{
0 commit comments