@nzz/q-cli 1.5.1 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 {
|