Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-25769

EFD client returns unhelpful error if InfluxDB is down

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: efd
    • Labels:
      None

      Description

      Currently the EFD client ends up raising a JSONDecodeError when the InfluxDB is down. This is essentially because a 400 is returned from the endpoint and that is not valid JSON. The aioinflux client tries to decode the error and throws the exception.

      I'm not sure whether the better thing to do is to make the aioinflux client raise a more useful error or to do a health check of the InfluxDB at construction time.

        Attachments

          Activity

          Hide
          krughoff Simon Krughoff added a comment -

          PR is here.

          Show
          krughoff Simon Krughoff added a comment - PR is here .
          Hide
          afausti Angelo Fausti added a comment -

          I like the solution, checking the `/heath` endpoint seems a good way to validate the InfluxDB instance. See comments on the PR.

          Show
          afausti Angelo Fausti added a comment - I like the solution, checking the `/heath` endpoint seems a good way to validate the InfluxDB instance. See comments on the PR.

            People

            • Assignee:
              krughoff Simon Krughoff
              Reporter:
              krughoff Simon Krughoff
              Reviewers:
              Angelo Fausti
              Watchers:
              Angelo Fausti, Simon Krughoff
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: