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

Type-cast inputs for general Error #280

Merged

Conversation

CasperWA
Copy link
Member

@CasperWA CasperWA commented May 27, 2020

Fixes #281

I had an issue, where detail wasn't passed as a string, and it failed to produce a response.
This fixes it, by explicitly type-casting all values needed for the most general exception creation of an OptimadeError

@CasperWA CasperWA added the bug Something isn't working label May 27, 2020
@CasperWA CasperWA requested review from ml-evs and shyamd May 27, 2020 12:10
@codecov
Copy link

codecov bot commented May 27, 2020

Codecov Report

Merging #280 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #280      +/-   ##
==========================================
+ Coverage   89.93%   89.94%   +0.01%     
==========================================
  Files          54       54              
  Lines        2245     2248       +3     
==========================================
+ Hits         2019     2022       +3     
  Misses        226      226              
Flag Coverage Δ
#unittests 89.94% <100.00%> (+0.01%) ⬆️
Impacted Files Coverage Δ
optimade/server/exception_handlers.py 80.30% <100.00%> (+0.93%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af5a580...87f0e8b. Read the comment docs.

Copy link
Member

@ml-evs ml-evs left a comment

Choose a reason for hiding this comment

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

Looks fine to me, I can't foresee any possible adverse effects of this fix.

@CasperWA CasperWA merged commit 53a22f8 into Materials-Consortia:master May 27, 2020
@CasperWA CasperWA deleted the secure_general_exception branch May 27, 2020 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

General exceptions not being put into response
2 participants