Skip to content
Snippets Groups Projects

api/vault: Fix 404 handling and improve error messages

Vault 404 error handling needed to be updated since changes related to exception handling server side.

Also improve returned error messages, add missing test and slightly refactor tests implementation (use hypothesis instead of harcoded data).

Closes T2388


Migrated from D3125 (view on Phabricator)

Merge request reports

Closed by Phabricator Migration userPhabricator Migration user 4 years ago (May 5, 2020 5:20pm UTC)

Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1090 1089 return (rev["id"], lookup_directory_with_revision(rev["id"], path, with_data))
1091 1090
1092 1091
1092 def _vault_request(vault_fn, *args, **kwargs):
1093 try:
1094 return vault_fn(*args, **kwargs)
1095 except VaultNotFoundExc:
1096 return None
  • Author Maintainer

    Update: Synchronize with latest changes in swh-vault

  • Nice.

    (some copyright date range headers are off but besides that, cool)

    (also debian vault build is fine \m/)

  • Merge request was accepted

  • Antoine R. Dumont approved this merge request

    approved this merge request

  • Author Maintainer

    Bump swh.vault in requirements-swh.txt and update years in license headers.

  • Author Maintainer

    (some copyright date range headers are off but besides that, cool)

    Done, and we should definitely write a pre-commit hook for that ;-)

  • Build is green

    Patch application report for D3125 (id=11107)

    Rebasing onto 97c8291f...

    Current branch diff-target is up to date.
    Changes applied before test
    commit 5b4ba39266345d0de63a17e1eb0fd8675ab341e0
    Author: Antoine Lambert <antoine.lambert@inria.fr>
    Date:   Tue May 5 16:09:28 2020 +0200
    
        api/vault: Fix 404 handling and improve error messages
        
        Vault 404 error handling needed to be updated since changes related to
        exception handling server side.
        
        Also improve returned error messages, add missing test and slightly
        refactor tests implementation (use hypothesis instead of harcoded data).
        
        Closes [T2388](https://forge.softwareheritage.org/T2388 'view original for T2388 on Phabricator')

    See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/116/ for more details.

  • Build is green

    Patch application report for D3125 (id=11108)

    Rebasing onto 97c8291f...

    Current branch diff-target is up to date.
    Changes applied before test
    commit affd506bc632882492a291cac08fb93886fb42e3
    Author: Antoine Lambert <antoine.lambert@inria.fr>
    Date:   Tue May 5 16:09:28 2020 +0200
    
        api/vault: Fix 404 handling and improve error messages
        
        Vault 404 error handling needed to be updated since changes related to
        exception handling server side.
        
        Also improve returned error messages, add missing test and slightly
        refactor tests implementation (use hypothesis instead of harcoded data).
        
        Closes [T2388](https://forge.softwareheritage.org/T2388 'view original for T2388 on Phabricator')

    See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/117/ for more details.

  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Please register or sign in to reply
    Loading