Skip to content

Commit

Permalink
Add nil check for response data
Browse files Browse the repository at this point in the history
  • Loading branch information
tateexon authored and krebernisak committed Feb 16, 2022
1 parent 72b6f36 commit ac47d98
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export default class UploadContractCode extends TerraCommand {
contract: null,
})
} catch (e) {
const message = e.response.data.message || e.message
const message = e.response?.data?.message || e.message
logger.error(`Error deploying ${contractName} on attempt ${retry + 1} with the error: ${message}`)
if (maxRetry === retry + 1) {
throw new Error(message)
Expand Down

0 comments on commit ac47d98

Please sign in to comment.