Skip to content

Errors seem to be architecture dependant #116

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

Open
tback opened this issue Sep 20, 2024 · 3 comments
Open

Errors seem to be architecture dependant #116

tback opened this issue Sep 20, 2024 · 3 comments

Comments

@tback
Copy link

tback commented Sep 20, 2024

Current Behavior

Exceptions live in the platform dependent part. Handling them is therefore platform dependent as well. An example

...
onepassword.lib.aarch64.op_uniffi_core.Error.Error: msg='error resolving secret reference: the specified field cannot be found within the item'

Desired Behavior

Please have platform independent exceptions.

Benefits & Value

Code that is written on modern macs can be run on the developer machine natively and work the same way on production systems that are on intel

Additional information

No response

@MOmarMiraj
Copy link
Contributor

Hi @tback,

Sorry for the late response! The errors you are encountering are not platform dependent errors and is actually relevant to the entire SDK. We have improved the error messages with the latest SDKs and hope that addresses your issues. I will leave it open for discussion unless your okay with closing it.

@tback
Copy link
Author

tback commented Apr 9, 2025

0.1.1 was the current release at the time. Great you addressed that. The current state of typed Errors still leaves room for improvement though:

Now I get a generic Exception of type Exception for all but RateLimitExceededExceptions. From a user perspective it makes a difference if the vault is missing, the item is missing or if it is not unique. One might be expected (and caught) the other might my unexpected and should cause the program to terminate.
Right now the only way to deal with it is to compare error messages - which I assume might be tweaked in between versions.

@MOmarMiraj
Copy link
Contributor

Ahh yes, error messages will get updated and more similar to RateLimitExceededException can be added to the SDKs. I will raise this internally and to the product team for prioritization.

Thanks for the context!

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

No branches or pull requests

2 participants