Skip to content

Handle a bad_request triple in fabric_doc_update#5948

Merged
nickva merged 1 commit into
mainfrom
handle-bad-request-triple
Mar 27, 2026
Merged

Handle a bad_request triple in fabric_doc_update#5948
nickva merged 1 commit into
mainfrom
handle-bad-request-triple

Conversation

@nickva
Copy link
Copy Markdown
Contributor

@nickva nickva commented Mar 26, 2026

Besides the {bad_request, Msg} also handle the {bad_request, Error, Reason} triple. Design document validator can return those (see below), for instance.

While at it add a test to cover both the tuple and the triple case.

{bad_request, invalid_design_doc, Reason};
throw:{compilation_error, Reason} ->
{bad_request, compilation_error, Reason};

Besides the `{bad_request, Msg}` also handle the `{bad_request, Error,
Reason}` triple.  Design document validator can return those [1], for  instance.

While at it add a test to cover both the tuple and the triple case.

[1] https://github.com/apache/couchdb/blob/997deea76f4489e2e8702bb7dbf50eceffdd5650/src/couch/src/couch_db.erl#L984-L986
@nickva nickva merged commit c4e798f into main Mar 27, 2026
59 checks passed
@nickva nickva deleted the handle-bad-request-triple branch March 27, 2026 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants