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

Remove traps from authenticated_anchor_operation #2222

Merged
merged 9 commits into from
Jan 23, 2024

Conversation

frederikrothenberger
Copy link
Member

@frederikrothenberger frederikrothenberger commented Jan 22, 2024

This removes the traps from the authenticated_anchor_operation helper, which allows to add proper errors to identity_metadata_replace.

I will do a follow-up PR to move the authentication helpers and error mappers out of the main.rs file to keep it focused on the endpoints.

This removes the traps from the authenticated_anchor_operation helper,
which allows to add proper errors to `identity_metadata_replace`.
@nmattia
Copy link
Collaborator

nmattia commented Jan 22, 2024

Can you briefly explain why the API breakage is fine?

@frederikrothenberger
Copy link
Member Author

frederikrothenberger commented Jan 22, 2024

Can you briefly explain why the API breakage is fine?

The API breakage is fine because it is in the API v2 only, which is labeled as experimental.

Unfortunately, there is no clean way to mark parts of the API as experimental that would be natively understood by the candid check.

Copy link
Collaborator

@przydatek przydatek left a comment

Choose a reason for hiding this comment

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

LGTM, modulo two questions.
Thanks!

src/internet_identity/src/main.rs Outdated Show resolved Hide resolved
src/internet_identity/src/main.rs Outdated Show resolved Hide resolved
@frederikrothenberger
Copy link
Member Author

@przydatek: I added the context to the errors. Could you please take another look?

I will then also do another PR to also adapt the PrepareIdAliasError::Unauthorized variant to hold information about the principal that is unauthorized.

Copy link
Collaborator

@przydatek przydatek left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@frederikrothenberger frederikrothenberger added this pull request to the merge queue Jan 23, 2024
Merged via the queue into main with commit 182478b Jan 23, 2024
63 checks passed
@frederikrothenberger frederikrothenberger deleted the frederik/refactor-trap branch January 23, 2024 10:20
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.

3 participants