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

unsupported value: +Inf" error not handled gracefully #20249

Closed
davidby-influx opened this issue Dec 4, 2020 · 1 comment
Closed

unsupported value: +Inf" error not handled gracefully #20249

davidby-influx opened this issue Dec 4, 2020 · 1 comment

Comments

@davidby-influx
Copy link
Contributor

JSON marshalling errors should be returned as properly formatted JSON errors.

Steps to reproduce:

> create database db
> use db
Using database db
> insert m v=1.7976931348623157E308
> insert m v=1.7976931348623157E308
> 
> select * from m
name: m
time                v
----                -
1604428620720870437 1.7976931348623157e+308
1604428621584887557 1.7976931348623157e+308

> select sum(v) from m
ERR: 
> exit
$ curl "http://localhost:8086/query?db=EAR1834" --data-urlencode "q=select sum(v) from m"  

Expected behavior:

$ curl "http://localhost:8086/query?db=EAR1834" --data-urlencode "q=select sum(v) from m"  
{"error":"json: unsupported value: +Inf"}

Actual behavior:

$ curl "http://localhost:8086/query?db=db" --data-urlencode "q=select sum(v) from m"  
json: error calling MarshalJSON for type httpd.Response: json: error calling MarshalJSON for type *query.Result: json: unsupported value: +Inf

Environment info:

  • v1.8.3
@davidby-influx davidby-influx self-assigned this Dec 4, 2020
davidby-influx added a commit that referenced this issue Dec 4, 2020
JSON marshalling errors should be returned properly formatted in JSON
like other errors. This fix formats marshalling errors the same way
influxdb formats other query errors.

Fixes #20249
davidby-influx added a commit that referenced this issue Dec 4, 2020
JSON marshalling errors should be returned properly formatted in JSON
like other errors. This fix formats marshalling errors the same way
influxdb formats other query errors.

Fixes #20249
davidby-influx added a commit that referenced this issue Dec 4, 2020
JSON marshalling errors should be returned properly formatted in JSON
like other errors. This fix formats marshalling errors the same way
influxdb formats other query errors.

Fixes #20249
davidby-influx added a commit that referenced this issue Dec 7, 2020
…0250)

JSON marshalling errors should be returned properly formatted in JSON
like other errors. This fix formats marshalling errors the same way
influxdb formats other query errors.

Fixes #20249
@davidby-influx
Copy link
Contributor Author

Pushed.

ttps://github.com//pull/20250

davidby-influx added a commit that referenced this issue Dec 7, 2020
JSON marshalling errors should be returned properly formatted in JSON
like other errors. This fix formats marshalling errors the same way
influxdb formats other query errors.

Fixes #20249

(cherry picked from commit 2407077)
davidby-influx added a commit that referenced this issue Dec 7, 2020
…0276)

* fix(error): unsupported value: +Inf" error not handled gracefully

JSON marshalling errors should be returned properly formatted in JSON
like other errors. This fix formats marshalling errors the same way
influxdb formats other query errors.

Fixes #20249

(cherry picked from commit 2407077)

* chore(changelog): update CHANGELOG.md for PR #20276
dgnorton pushed a commit that referenced this issue Feb 3, 2021
…0276)

* fix(error): unsupported value: +Inf" error not handled gracefully

JSON marshalling errors should be returned properly formatted in JSON
like other errors. This fix formats marshalling errors the same way
influxdb formats other query errors.

Fixes #20249

(cherry picked from commit 2407077)

* chore(changelog): update CHANGELOG.md for PR #20276
dgnorton pushed a commit that referenced this issue Feb 3, 2021
…0276)

* fix(error): unsupported value: +Inf" error not handled gracefully

JSON marshalling errors should be returned properly formatted in JSON
like other errors. This fix formats marshalling errors the same way
influxdb formats other query errors.

Fixes #20249

(cherry picked from commit 2407077)

* chore(changelog): update CHANGELOG.md for PR #20276
lesam added a commit to lesam/influxdb that referenced this issue Mar 4, 2021
If there is some error writing to the response writer, we
would previous have infinite recursion.

Re-closes influxdata#20249
@lesam lesam mentioned this issue Mar 4, 2021
4 tasks
lesam added a commit to lesam/influxdb that referenced this issue Mar 4, 2021
If there is some error writing to the response writer, we
would previous have infinite recursion.

Re-closes influxdata#20249
lesam added a commit to lesam/influxdb that referenced this issue Mar 4, 2021
If there is some error writing to the response writer, we
would previous have infinite recursion.

Re-closes influxdata#20249
lesam added a commit to lesam/influxdb that referenced this issue Mar 4, 2021
If there is some error writing to the response writer, we
would previous have infinite recursion.

Re-closes influxdata#20249
lesam added a commit that referenced this issue Mar 4, 2021
* Revert "fix(error): unsupported value: +Inf" error not handled gracefully (#20250)"

This reverts commit 6ac0bb3.

* fix: No infinite recursion on write error

If there is some error writing to the response writer, we
would previous have infinite recursion.

Re-closes #20249
davidby-influx pushed a commit that referenced this issue Mar 6, 2021
* Revert "fix(error): unsupported value: +Inf" error not handled gracefully (#20250)"

This reverts commit 6ac0bb3.

* fix: No infinite recursion on write error

If there is some error writing to the response writer, we
would previous have infinite recursion.

Re-closes #20249

(cherry picked from commit d6f7716)
davidby-influx pushed a commit that referenced this issue Mar 10, 2021
* Revert "fix(error): unsupported value: +Inf" error not handled gracefully (#20250)"

This reverts commit 6ac0bb3.

* fix: No infinite recursion on write error

If there is some error writing to the response writer, we
would previous have infinite recursion.

Re-closes #20249

(cherry picked from commit d6f7716)
davidby-influx added a commit that referenced this issue Mar 10, 2021
* fix: infinite recursion bug (#20862)

* Revert "fix(error): unsupported value: +Inf" error not handled gracefully (#20250)"

This reverts commit 6ac0bb3.

* fix: No infinite recursion on write error

If there is some error writing to the response writer, we
would previous have infinite recursion.

Re-closes #20249

(cherry picked from commit d6f7716)

* chore: update CHANGELOG.md

Co-authored-by: Sam Arnold <sarnold@influxdata.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant