Skip to content

Commit

Permalink
v3.5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
karnthis committed Feb 11, 2025
1 parent 4d94b6c commit 3d3b1b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jackallabs/jackal.js",
"version": "3.5.6",
"version": "3.5.7",
"description": "Javascript library for interacting with the Jackal Chain",
"keywords": [
"jackal",
Expand Down
7 changes: 4 additions & 3 deletions src/classes/storageHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2276,9 +2276,6 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler {

console.log('startBlock:', startBlock.toString())
return await fetch(url, {
headers: {
'Content-Type': 'multipart/form-data',
},
method: 'POST',
body: fileFormData,
}).then(
Expand All @@ -2287,6 +2284,10 @@ export class StorageHandler extends EncodingHandler implements IStorageHandler {
throw new Error(`Status Message: Empty Response`)
}
if (resp.status !== 200) {
if (resp.status === 400) {
const parsed = await resp.json()
console.warn('400 error:', parsed.error)
}
throw new Error(`Status Message: ${resp.statusText}`)
} else {
return resp.json()
Expand Down

0 comments on commit 3d3b1b8

Please sign in to comment.