Skip to content

Commit

Permalink
Improve error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
DimaStebaev committed Apr 12, 2024
1 parent 70276d0 commit fd284f8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions typescript/base/src/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export abstract class Project<ContractType> {
}

async downloadAbiFile (version: string) {
const exceptions = [];
const exceptions: string[] = [];
for (const abiUrl of this.getAbiUrls(version)) {
try {
// Await expression should be executed only
Expand All @@ -42,10 +42,10 @@ export abstract class Project<ContractType> {
const response = await axios.get(abiUrl);
return response.data as SkaleABIFile;
} catch (exception) {
exceptions.push(exception);
exceptions.push(`\nDownloading from ${abiUrl} - ${exception}`);
}
}
throw new Error(exceptions.toString());
throw new Error(exceptions.join(""));
}

getAbiUrls (version: string) {
Expand Down

0 comments on commit fd284f8

Please sign in to comment.