Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions framework/python/src/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,13 +1105,13 @@ async def upload_cert(self, file: UploadFile, response: Response):
response.status_code = status.HTTP_400_BAD_REQUEST
return self._generate_msg(
False,
"Failed to upload certificate. Is it in the correct format?")
"Failed to upload certificate. The file is corrupted.")

# Return error if something went wrong
if cert_obj is None:
response.status_code = 500
return self._generate_msg(
False, "Failed to upload certificate. Is it in the correct format?")
False, "Failed to upload certificate. An error occurred.")

response.status_code = status.HTTP_201_CREATED

Expand Down