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

Extract exception message from chain for API errors #2100

Merged
merged 2 commits into from
Oct 6, 2020
Merged

Conversation

ludeeus
Copy link
Member

@ludeeus ludeeus commented Oct 6, 2020

Proposed change

While working on #2099 I noticed that many operations would result in a blank error message returned to the CLI/API, this change extracts the message from the exception chain

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (which adds functionality to the supervisor)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast supervisor tests)
  • Tests have been added to verify that the new code works.

If API endpoints of add-on configuration are added/changed:

@pvizeli
Copy link
Member

pvizeli commented Oct 6, 2020

Your PR for handle error on API like for port mapping is not needed with #1946

I approved it anyway, because it's don't change to match. Now we start to change the hole error handling to parse error message with regex on API return. It feel a bit like an hack.

I think instead to move forward with this, we should implement #1946 and allow to set usable error message where they are see (Like on run/start function on docker)

EDIT:
We can also use the exception chain to looking for an Docker API 500 error to parse instead to make this, so it work all time until we have #1946 (maybe that's the better way, also with #1946)

@ludeeus ludeeus changed the title Forward exceptions Extract exception message from chain for API errors Oct 6, 2020
@pvizeli pvizeli merged commit 17559bf into dev Oct 6, 2020
@delete-merged-branch delete-merged-branch bot deleted the forward-logs branch October 6, 2020 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants