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: get credential by said 404 response #282

Merged
merged 6 commits into from
Sep 20, 2024

Conversation

iFergal
Copy link
Collaborator

@iFergal iFergal commented Aug 7, 2024

rgy.reger.cloneCred or cloneCreds will cause a 500 error if the credential does not exist:

  File "/Users/fergaloconnor/dev/keri/cardano-foundation/keria/venv/lib/python3.12/site-packages/keri/vdr/viring.py", line 488, in cloneCred
    prefixer, seqner, saider = self.cancs.get(keys=(said,))
    ^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: cannot unpack non-iterable NoneType object

I fixed this in keripy to throw a missing entry error: WebOfTrust/keripy#841

So just catching that and returning 404.

Copy link

codecov bot commented Aug 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.70%. Comparing base (18d3ad7) to head (5a1ad28).
Report is 19 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #282      +/-   ##
==========================================
+ Coverage   93.06%   93.70%   +0.64%     
==========================================
  Files          36       36              
  Lines        7121     7863     +742     
==========================================
+ Hits         6627     7368     +741     
- Misses        494      495       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@iFergal
Copy link
Collaborator Author

iFergal commented Aug 9, 2024

Actually, there is kering.MissingEntryError already in keripy. I think this would be better to throw from keripy - I will look at this at some point. Marking as draft.

@iFergal
Copy link
Collaborator Author

iFergal commented Aug 12, 2024

WebOfTrust/keripy#841 merged, will update this when there's a release with it and I'm free

@iFergal iFergal marked this pull request as ready for review September 11, 2024 08:13
@iFergal iFergal marked this pull request as draft September 11, 2024 08:13
@iFergal iFergal marked this pull request as ready for review September 20, 2024 07:25
@iFergal
Copy link
Collaborator Author

iFergal commented Sep 20, 2024

cc @2byrds

Copy link
Collaborator

@2byrds 2byrds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@2byrds 2byrds merged commit 62057ce into WebOfTrust:main Sep 20, 2024
5 checks passed
@iFergal iFergal deleted the fix/cred404 branch September 20, 2024 15:32
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