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

Add exception handling for missing portfolio in list analysis #996

Merged
merged 2 commits into from
Mar 18, 2024

Conversation

sambles
Copy link
Contributor

@sambles sambles commented Mar 13, 2024

Add exception handling for missing portfolio in list analysis

Fix for issue #995 this doesn't prevent the issue, only stops the 500 server error and notes the problem in server logs:

Log Example:

INFO 2024-03-13 10:52:14,959 middleware 317 140008600104960 GET /v2/?format=openapi - 200
ERROR 2024-03-13 10:52:19,477 models 115 140008600104960 Analyses ID: 43 portfolio not found, test exception
Traceback (most recent call last):
  File "/var/www/oasis/src/server/oasisapi/analyses/models.py", line 314, in get_groups
    raise ValueError('test exception')
ValueError: test exception
ERROR 2024-03-13 10:52:19,508 models 115 140008600104960 Analyses ID: 44 portfolio not found, test exception
Traceback (most recent call last):
  File "/var/www/oasis/src/server/oasisapi/analyses/models.py", line 314, in get_groups
    raise ValueError('test exception')
ValueError: test exception
INFO 2024-03-13 10:52:19,514 middleware 115 140008600104960 GET /v2/analyses/

@sambles
Copy link
Contributor Author

sambles commented Mar 13, 2024

Test images

  • coreoasis/model_worker:2.3.2rc2
  • coreoasis/api_server:2.3.2rc2

@sambles sambles merged commit 97fb1d1 into main Mar 18, 2024
30 checks passed
@sambles sambles deleted the fix/995-list-analyses-v2-error branch March 18, 2024 15:49
sambles added a commit that referenced this pull request Mar 18, 2024
* Add exception handling for missing portfolio in list analysis

* update image tag
@sambles sambles mentioned this pull request Mar 25, 2024
6 tasks
@awsbuild awsbuild modified the milestone: 2.3.2 Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

List analyses serializer returning Portfolio does not exist error
2 participants