Skip to content

Add better api error messages#319

Merged
TessFerrandez merged 3 commits into
developfrom
tessferrandez/add-better-api-error-messages
Jun 21, 2021
Merged

Add better api error messages#319
TessFerrandez merged 3 commits into
developfrom
tessferrandez/add-better-api-error-messages

Conversation

@TessFerrandez
Copy link
Copy Markdown
Member

@TessFerrandez TessFerrandez commented Jun 18, 2021

PR for issue #213

What is being addressed

  • Unhandled errors should not leak information
  • Make it easier to debug errors without leaking info

How is this addressed

  • Add a generic error handler that logs information, but also displays in the browser if DEBUG=True
  • Change the HTTP and ValidationError output so that it is more human readable
  • Update related tests

NOTE: Because I built this on an existing branch - for some reason the changes that have already been merged still show up in this diff - but you can ignore any changes in resource_templates, workspace_templates and the tests for those files - they have already been merged

@TessFerrandez TessFerrandez self-assigned this Jun 18, 2021
@TessFerrandez TessFerrandez added the api Composition Service API label Jun 18, 2021
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 18, 2021

Unit Test Results

  1 files    1 suites   1s ⏱️
49 tests 49 ✔️ 0 💤 0 ❌

Results for commit 62ee1b5.

♻️ This comment has been updated with latest results.

Copy link
Copy Markdown
Contributor

@sachinkundu sachinkundu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work with the middleware for error handling!

Comment thread management_api_app/api/errors/generic_error.py Outdated
@TessFerrandez TessFerrandez merged commit f7f2042 into develop Jun 21, 2021
@TessFerrandez TessFerrandez deleted the tessferrandez/add-better-api-error-messages branch June 21, 2021 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Composition Service API

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Add more descriptive error messages if workspaces/workspace templates can't be created/retrieved

2 participants