Description
The scripts utilising fetch are currently swallowing exceptions (deploy.js, deploy-prod.js, create-addon.js, etc..)
When calling the script from a terminal, it will always report back as successful, even if it has failed.
This causes problems with CI/CD pipelines, that rely on exit codes to present results and handle control flow.
Expected behaviour
try {
const response = await fetch(url, {
...
});
handleResponse({ response, operation: 'Upload' });
} catch (err) {
console.log(`${chalk.red('Upload failed, status code:')} ${err}`);
// exit with error code here, or maybe re-throw exception to handle it further up the call chain?
}
Current behaviour
try {
const response = await fetch(url, {
...
});
handleResponse({ response, operation: 'Upload' });
} catch (err) {
console.log(`${chalk.red('Upload failed, status code:')} ${err}`);
// exception is being swallowed here
}
Description
The scripts utilising fetch are currently swallowing exceptions (deploy.js, deploy-prod.js, create-addon.js, etc..)
When calling the script from a terminal, it will always report back as successful, even if it has failed.
This causes problems with CI/CD pipelines, that rely on exit codes to present results and handle control flow.
Expected behaviour
Current behaviour