Comments (2)
I've found the issue and some behaviour I don't understand.
Originally, the only error the would be displayed was the error from creating an IAM group and user with a reused name. This error came from Amazon and is of type string
.
The other errors that I am able to invoke but were not being displayed include:
- creating VPCs: reaching the maximum number of VPCs allowed
- creating a subnet: giving an incorrect availability zone
- creating EFS: reusing a creation token
All of these errors are of typeobject
. The Ora spinner expects a string, which is why the spinner couldn't display the error message.
To fix this issue, I have created a utility method stringifyErrorMsg
that checks for the type of error. If it receives an object, it retrieves the string at the key stderr
and returns it.
Unknown behaviour
The other errors I can invoke are of type object because they are being returned by the catch
block in executeProcess.js
. However, the error from creating the IAM group and user are being returned by the if
statement inside the try
block. I don't understand why these errors are being handled differently.
from gander-cli.
I investigated the unknown behaviour more by invoking as many errors as I could in as many AWS API calls as possible, namely by passing in false IDs, and have come to conclude the following about the unknown behaviour.
All errors we receive seem to be returned by the catch
block. As soon as the executed bash script fails, the code moves on to the catch
block, skipping all code in the try
block following the script execution.
However, the error received from reusing an IAM group and user name is not caught by the catch
block. Thus, the if
statement inside the try
block - is the only place that it will get caught. I don't know why this one particular error that I can invoke isn't caught.
I don't understand why this behaviour happens, but it does.
from gander-cli.
Related Issues (12)
- Setup command does not create AWS service role for task definition HOT 1
- Setup does not create ECR repository HOT 1
- Setup does not open up port 8080 on the cluster security group HOT 1
- `fleet init` should put `teardown-review-app` into repository
- CLI setup - 'file system initialized' message shows up multiple times HOT 1
- Workflow: add resource ids as environment variables to remove AWS api calls to fetch ids
- CLI setup - IAM user is not added to IAM user group
- Task Execution Role logged twice
- CLI - we use two configuration files
- Database container is not ready for application server with particular frameworks
- Certain frameworks require explicit entrypoint scripts HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gander-cli.