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

json/read-str can throw exception on invalid JSON content #1

Closed
iarenaza opened this issue May 24, 2019 · 0 comments
Closed

json/read-str can throw exception on invalid JSON content #1

iarenaza opened this issue May 24, 2019 · 0 comments

Comments

@iarenaza
Copy link
Contributor

do-request uses json/read-str to convert the response of the request into a Clojure data structure and return it as the :body value (https://github.com/magnetcoop/dashboard-manager.grafana/blob/0acf4f238e8dbd6e26f54208639830cdcfb625bf/src/magnet/dashboard_manager/grafana.clj#L70).

But if we get invalid JSON from the remote endpoint, it throws an exception. And we don't catch it and produce a suitable return value for the method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant