@nzz/q-cli 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -223,11 +223,13 @@ async function uploadResource(qServer, accessToken, cookie, resourcePath) {
|
|
223
223
|
headers: headers,
|
224
224
|
body: form,
|
225
225
|
});
|
226
|
+
const body = await response.json();
|
227
|
+
|
226
228
|
if (response.ok) {
|
227
|
-
return
|
229
|
+
return body;
|
228
230
|
} else {
|
229
231
|
throw new Error(
|
230
|
-
`Error occured while uploading the resource at ${resourcePath}. Please check your connection and try again.\nResponse: ${
|
232
|
+
`Error occured while uploading the resource at ${resourcePath}. Please check your connection and try again.\nResponse: ${body.statusCode} ${body.error} - ${body.message}`
|
231
233
|
);
|
232
234
|
}
|
233
235
|
} else {
|