Skip to content

Commit

Permalink
refactor: return error messages properly
Browse files Browse the repository at this point in the history
  • Loading branch information
ProCode2 committed Jan 18, 2024
1 parent a0b306b commit 8335ba9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion care/abdm/api/viewsets/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def post(self, request, *args, **kwargs):
exc_info=True,
)
return Response(

Check warning on line 35 in care/abdm/api/viewsets/auth.py

View check run for this annotation

Codecov / codecov/patch

care/abdm/api/viewsets/auth.py#L35

Added line #L35 was not covered by tests
{"error": "Error: Initialising ABDM Gateway failed."},
{"detail": "Error: Initialising ABDM Gateway failed."},
status=status.HTTP_400_BAD_REQUEST,
)

Expand Down
1 change: 0 additions & 1 deletion care/abdm/api/viewsets/healthid.py
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,6 @@ def add_care_context(self, request, *args, **kwargs):
return Response(
{
"detail": "Failed to add care context",
"error": "Error: Failed to integrate care.",
},
status=status.HTTP_400_BAD_REQUEST,
)
Expand Down

0 comments on commit 8335ba9

Please sign in to comment.