Summary of What Needs to be Done:
The documents.py endpoint returns HTTP 401 Unauthorized when a document has been soft-deleted (is_deleted=True) and accessed via a share link. Since the document no longer exists from the client's perspective, the correct status code is 404 Not Found. The current behavior is semantically incorrect and can confuse API consumers.
Changes that Need to be Made:
- backend/app/api/v1/documents.py: change status_code=status.HTTP_401_UNAUTHORIZED to status.HTTP_404_NOT_FOUND on the branch that handles is_deleted documents.
Impact that it would Provide:
- Correct HTTP semantics: deleted resources return 404, not 401.
- Prevents client-side confusion where a valid auth context gets a 401 for a document that simply no longer exists.
Note: Please assign this issue to the tmdeveloper007 account.
Summary of What Needs to be Done:
The documents.py endpoint returns HTTP 401 Unauthorized when a document has been soft-deleted (is_deleted=True) and accessed via a share link. Since the document no longer exists from the client's perspective, the correct status code is 404 Not Found. The current behavior is semantically incorrect and can confuse API consumers.
Changes that Need to be Made:
Impact that it would Provide:
Note: Please assign this issue to the
tmdeveloper007account.