-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CDK: Improve error message if an input JSON cannot be deserialized #18946
Labels
accepting-contributions
Feel free to contribute to them
team/extensibility
type/enhancement
New feature or request
Comments
sherifnada
added
type/enhancement
New feature or request
good first issue
accepting-contributions
Feel free to contribute to them
team/extensibility
labels
Nov 4, 2022
Here is an example of this (extra comma in line 11)
This is the error it throws:
|
grooming notes:
|
This was referenced Nov 22, 2022
This has been solved as part of #20019 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
accepting-contributions
Feel free to contribute to them
team/extensibility
type/enhancement
New feature or request
Tell us about the problem you're trying to solve
If I provide an invalid JSON to the low-code CDK (e.g
python --config secrets/config.json --catalog integration_tests/configured_catalog.json --state integration_tests/state.json
I get a very unhelpful error messagee.g: cannot decode bla bla bla
.As a user I have no idea what the problem is in this case
Describe the solution you’d like
I would prefer to get a clear error message e.g: (
Cannot read the input JSON file xyz.json . Please ensure it is valid JSON
). We should be able to catch these errors within atry... except
block and re-throw a more user friendly error.There are four inputs that we should clean up the error messages for. For scoping we'll limit this to inputs in
entrypoint.py
:--config
--catalog
--state
Acceptance Criteria:
For an existing source connector (greenhouse, freshdesk, etc), after pulling the latest version of airbyte-cdk, run a read against the connector using the following command in the connector's top directory:
python main.py read --config secrets/config.json --catalog integration_tests/configured_catalog.json
For each of the following cases, modify the file to have invalid json and we should expect to see the improved error message:
secrets/config.json
integration_tests/configured_catalog.json
source_<name>/spec.<json | yaml>
integration_tests/state.json
(also append--state integration_tests/state.json
to the command)The text was updated successfully, but these errors were encountered: