The error returned when a document is not found is ErrorInvalidInput, but this is semantically incorrect. A valid UUID that doesn't exist in the database is not "invalid input" - it's a valid request for a non-existent resource. Consider returning ErrorDatabase or adding a new error code like ErrorNotFound to more accurately represent this case. This same issue exists in the calling code that returns ErrorInvalidInput when get_document fails.
Originally posted by @Copilot in #19 (comment)
The error returned when a document is not found is
ErrorInvalidInput, but this is semantically incorrect. A valid UUID that doesn't exist in the database is not "invalid input" - it's a valid request for a non-existent resource. Consider returningErrorDatabaseor adding a new error code likeErrorNotFoundto more accurately represent this case. This same issue exists in the calling code that returnsErrorInvalidInputwhenget_documentfails.Originally posted by @Copilot in #19 (comment)