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

Report non-processing state check #309

Merged
merged 6 commits into from
Jun 24, 2024
Merged

Conversation

guffee23
Copy link
Contributor

Closes #286

Copy link

github-actions bot commented Jun 21, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/sbl_filing_api/routers
  filing.py
Project Total  

This report was generated by python-coverage-comment-action

@@ -342,7 +342,7 @@ async def get_latest_submission_report(request: Request, lei: str, period_code:
"Cache-Control": "no-store",
},
)
return JSONResponse(status_code=status.HTTP_204_NO_CONTENT, content=None)
return JSONResponse(status_code=status.HTTP_404_NOT_FOUND, content=None)
Copy link
Collaborator

Choose a reason for hiding this comment

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

let's standardize the non-200 code handling and use RegTechHttpException

Copy link
Collaborator

Choose a reason for hiding this comment

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

same with the other report endpoint

@@ -352,7 +352,7 @@ async def get_latest_submission_report(request: Request, lei: str, period_code:
@requires("authenticated")
async def get_submission_report(request: Request, response: Response, lei: str, period_code: str, id: int):
sub = await repo.get_submission(request.state.db_session, id)
if sub:
if sub and not sub.state == SubmissionState.VALIDATION_IN_PROGRESS:
Copy link
Contributor

Choose a reason for hiding this comment

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

This won't work. Submissions could go to VALIDATION_ERROR without writing a report, or SUBMISSION_FAILED, SUBMISSION_UPLOAD, etc. So check for completed states

@jcadam14 jcadam14 merged commit 4146509 into main Jun 24, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check that submission for /report endpoints is in a non-processing state
3 participants