Skip to content

Commit

Permalink
Error response for ocr
Browse files Browse the repository at this point in the history
  • Loading branch information
brittnylapierre committed Oct 24, 2024
1 parent bd1f209 commit 953c804
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ async def ocr(prefix, noid):
resp_headers, obj_contents = get_file_from_swift(
f"{prefix}/{noid}/ocrALTO.xml", "access-metadata"
)
if obj_contents == None:
return { "message" : "File not found."}
return Response(content=obj_contents, media_type=resp_headers["content-type"])


Expand Down

0 comments on commit 953c804

Please sign in to comment.