Skip to content
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

better api error handling on the cli #2954

Closed
shahidhk opened this issue Sep 28, 2019 · 11 comments
Closed

better api error handling on the cli #2954

shahidhk opened this issue Sep 28, 2019 · 11 comments
Labels
c/cli Related to CLI e/intermediate can be wrapped up in a week e/quickfix can be wrapped up in few hours good first issue Good for newcomers help wanted Good candidate for contribution. Community help wanted!

Comments

@shahidhk
Copy link
Member

shahidhk commented Sep 28, 2019

If any of the API calls throw 504 etc or a non-JSON response, the CLI errors out saying

FATA[0031] apply failed: invalid character '<' looking for beginning of value

which is not really helpful for a user.

For all unknown API-errors, the CLI should print out the response code and body.

@shahidhk shahidhk added help wanted Good candidate for contribution. Community help wanted! good first issue Good for newcomers c/cli Related to CLI e/quickfix can be wrapped up in few hours e/intermediate can be wrapped up in a week labels Sep 28, 2019
@santoshyadavdev
Copy link
Contributor

I will take it @marionschleifer

@marionschleifer
Copy link
Contributor

marionschleifer commented Sep 30, 2019

@santoshyadav198613 great! Let us know if you have any questions 🙂

@dotslash21
Copy link

@marionschleifer I'd like to give this issue a try. I'm a beginner, so please guide me 😃

@marionschleifer
Copy link
Contributor

@dotslash21 we have created a wiki describing everything you need to know about Hasura & Hacktoberfest: https://github.com/hasura/graphql-engine/wiki/Hacktoberfest-2019-%F0%9F%8E%89 🙂

@santoshyadavdev
Copy link
Contributor

Hi @marionschleifer ,
I am using windows and getting lot of issues while running it locally, maybe this time I will pass it. Can we have docs on how to build it on windows, the docs refer to commands which are compatible on Linux.

@tingaloo
Copy link

tingaloo commented Oct 3, 2019

commands git:(master) $ go test migrate_apply_test.go
# command-line-arguments [command-line-arguments.test]
./migrate_apply_test.go:20:11: undefined: migrateApplyOptions
./migrate_apply_test.go:52:11: undefined: migrateApplyOptions
./migrate_apply_test.go:79:11: undefined: migrateApplyOptions
FAIL	command-line-arguments [build failed]

I'm trying to run some tests, but i keep getting an undefined variable. Am I missing a step in the testing process?

@rv404674
Copy link
Contributor

rv404674 commented Oct 3, 2019

@marionschleifer Is this issue assigned to someone. I can see from the comments santoshyadav198613 has left this issue due to os problems. If someone is already not working on it, can I take it?

@shahidhk
Copy link
Member Author

shahidhk commented Oct 3, 2019

@santoshyadav198613 Building on Windows is no different than building on a *nix machine as Go has good cross-platform support. If your hiccup is with make, I suggest you executing the commands in the make rules manually or using something like Windows Subsystem for Linux where most of the bash tools are available.

@shahidhk
Copy link
Member Author

shahidhk commented Oct 3, 2019

@tingaloo Some tests depend on other tests, it is better if you run them together. Like go test -ldflags "-X github.com/hasura/graphql-engine/cli/version.BuildVersion=$(VERSION)" ./...

@marionschleifer
Copy link
Contributor

@rv404674 we decided not to assign issues. People who want to contribute can just follow these guidelines: https://github.com/hasura/graphql-engine/wiki/Hacktoberfest-2019-%F0%9F%8E%89. If a draft PR is linked to an issue, it means someone is already working on it 🙂

@shahidhk
Copy link
Member Author

closed in c6ab101

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c/cli Related to CLI e/intermediate can be wrapped up in a week e/quickfix can be wrapped up in few hours good first issue Good for newcomers help wanted Good candidate for contribution. Community help wanted!
Projects
None yet
Development

No branches or pull requests

6 participants