fussybeaver / bollard

Docker daemon API in Rust
Apache License 2.0
814 stars 127 forks source link

Fix non JSON error responses creating `JsonSerdeError` #427

Open dsander opened 3 weeks ago

dsander commented 3 weeks ago

Some of the Docker API calls do not always return errors encoded as JSON. In that case bollard bollard returns a non descriptive JsonSerdeError:

JsonSerdeError { err: Error("expected value", line: 1, column: 1) }

The error handler now also checks if the serde error is_synxtax and returns the raw string in that case as well.

dsander commented 3 weeks ago

Hmm I don't know how to make this work on CI, locally the new test is one of the few that passes, it might be related to the docker version?

Client:
  Version:    27.0.3    
Server Version: 27.0.3
fussybeaver commented 3 weeks ago

Thank you for the fix! Could you try updating the docker image on CI here and see if that passes the CI check ?