Skip to content

Commit

Permalink
refactor: error handling
Browse files Browse the repository at this point in the history
Refs: #25
  • Loading branch information
bucurdavid committed Sep 20, 2023
1 parent 9523077 commit 0d1eed7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/datanft.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ export class DataNft {
return dataNfts;
}
} catch (error: any) {
throw new ErrDataNftCreate('Response could not be parsed');
throw new ErrDataNftCreate(
'Payload could not be parsed: ' + error.message
);
}
}

Expand Down Expand Up @@ -216,8 +218,8 @@ export class DataNft {
checkStatus(res);

const data = await res.json();
const dataNfts: DataNft[] = this.createFromApiResponseOrBulk(data);

const dataNfts: DataNft[] = this.createFromApiResponseOrBulk(data);
return dataNfts;
}

Expand Down
1 change: 0 additions & 1 deletion src/sft-minter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {
itheumTokenIdentifier,
minterContractAddress
} from './config';
import { MinterRequirements } from './interfaces';
import dataNftMinterAbi from './abis/datanftmint.abi.json';
import {
checkTraitsUrl,
Expand Down

0 comments on commit 0d1eed7

Please sign in to comment.