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
merged 1 commit into from Feb 5, 2019

Conversation

@eiri
Copy link
Member

@eiri eiri commented Feb 5, 2019

Overview

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

Checklist

  • Code is written and works correctly;
  • Changes are covered by tests;
  • Documentation reflects the changes;
@jaydoane
Copy link
Contributor

@jaydoane jaydoane commented Feb 5, 2019

+1

$ 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.

Loading

@tonysun83
Copy link
Contributor

@tonysun83 tonysun83 commented Feb 5, 2019

+1

Loading

@eiri eiri merged commit 20448c6 into master Feb 5, 2019
1 check passed
Loading
@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
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants