Skip to content

Commit

Permalink
Replace internal server error handling by flask errorhandler (asrevie…
Browse files Browse the repository at this point in the history
  • Loading branch information
J535D165 authored May 8, 2023
1 parent 407adaa commit 1902980
Show file tree
Hide file tree
Showing 2 changed files with 313 additions and 402 deletions.
2 changes: 2 additions & 0 deletions asreview/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def project_from_id(f):
@wraps(f)
def decorated_function(project_id, *args, **kwargs):
project_path = get_project_path(project_id)
if not is_project(project_path):
raise ProjectNotFoundError(f"Project '{project_id}' not found")
project = ASReviewProject(project_path, project_id=project_id)
return f(project, *args, **kwargs)

Expand Down
Loading

0 comments on commit 1902980

Please sign in to comment.