Skip to content

Errors seem to be architecture dependant #116

Open

Description

@tback

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

Activity

  1. MOmarMiraj commented on Apr 9, 2025

    @MOmarMiraj
    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.

  2. tback commented on Apr 9, 2025

    @tback
    Author

    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.

  3. MOmarMiraj commented on Apr 9, 2025

    @MOmarMiraj
    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!

  4. luckman212 commented on Jun 2, 2026

    @luckman212

    Any update to this issue? I was trying to write clean exception handlers for RateLimitExceededException but they don't seem to be hitting, just generic Exceptions raised, and I have to string-match against the error text (pretty brittle!)

    onepassword-sdk-0.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions