fix: register and deployBundled error handling fix (#342)
This commit is contained in:
@@ -145,10 +145,15 @@ export class DefaultCreateContract implements CreateContract {
|
||||
return response.json();
|
||||
} else {
|
||||
if (typeof response.json === 'function') {
|
||||
response.json().then((responseError) => {
|
||||
response
|
||||
.json()
|
||||
.then((responseError) => {
|
||||
if (responseError.message) {
|
||||
this.logger.error(responseError.message);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.logger.error(err);
|
||||
});
|
||||
}
|
||||
throw new Error(
|
||||
@@ -170,10 +175,15 @@ export class DefaultCreateContract implements CreateContract {
|
||||
return response.json();
|
||||
} else {
|
||||
if (typeof response.json === 'function') {
|
||||
response.json().then((responseError) => {
|
||||
response
|
||||
.json()
|
||||
.then((responseError) => {
|
||||
if (responseError.message) {
|
||||
this.logger.error(responseError.message);
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
this.logger.error(err);
|
||||
});
|
||||
}
|
||||
throw new Error(
|
||||
|
||||
Reference in New Issue
Block a user