Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix `badarg` crash on an invalid revision for individual doc update #1901

merged 1 commit into from Feb 5, 2019


None yet
3 participants
Copy link

eiri commented Feb 5, 2019


A companion of #1897, a missed clause of using parse_revid/1 outside of try block causing unknown_error crash on an individual doc update with invalid revision.

Testing recommendations

make eunit apps=couch suites=couch_db_doc_tests

Related Issues or Pull Requests

Fixes #1895


  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;

This comment has been minimized.

Copy link

jaydoane commented Feb 5, 2019


$ make eunit skip_deps+=couch_epi apps=couch suites=couch_db_doc_tests

module 'couch_db_doc_tests'
  CouchDB doc tests
    couch_db_doc_tests:60: should_truncate_number_of_revisions...ok
    couch_db_doc_tests:73: should_raise_bad_request_on_invalid_rev (foo)...ok
    couch_db_doc_tests:75: should_raise_bad_request_on_invalid_rev (a-foo)...ok
    couch_db_doc_tests:77: should_raise_bad_request_on_invalid_rev (1-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx)...ok
  All 4 tests passed.

This comment has been minimized.

Copy link

tonysun83 commented Feb 5, 2019


@eiri eiri merged commit 20448c6 into master Feb 5, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed

@eiri eiri deleted the fix-doc-update-invalid-rev-crash branch Feb 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.