This repository has been archived by the owner on Mar 9, 2022. It is now read-only.
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.
Android REST API returns HTTP status code 404 instead of 500 on SQLiteException when querying a design document #96
Labels
Related to this: https://github.com/couchbase/couchbase-lite-android/issues/1091
When a POST query to a design document causes SQLITE_MAX_VARIABLE_NUMBER to be exceeded, CBL throws a SQLiteException and returns HTTP 404.
I would expect CBL to return HTTP 500 (or something similar), since I assume 404 should be interpreted as "design document not found" (that is how the REST API works, although documentation does not seem to mention error codes).
The same issue might also happen with design doc GET queries, but I ran in to the issue when POSTing lots of keys.
In my case, I am querying design documents and creating them when necessary, so the 404 response causes the design documents to be detected as missing. Should it be possible to rely on the 404 response to come only for missing design documents?
Reproduced on Couchbase Lite for Android 1.3.1 and 1.4.0.
The text was updated successfully, but these errors were encountered: