Skip to content

Conversation

@AndyTitu
Copy link
Contributor

Summary

Shared library that acts as an IPC client only returns return codes instead of error messages. This MR takes those return codes and gives them meaning for the users.

Thought process

Look up what each return code means in the shared library code.

On MacOS:

            Self::InvalidArguments => -1,
            Self::UnexpectedOsError => -2,
            Self::RegistrationError => -3,
            Self::CorruptMessage => -4,
            Self::MessageTooLarge => -5,
            Self::FailedToSend => -6,
            Self::NoReply => -7,
            Self::Internal => -8,

On Linux/Windows:

            Self::InvalidArguments => -1,
            Self::FailedToConnect => -2,
            Self::FailedToSendMessage => -3,
            Self::FailedToReceiveResponse => -4,
            Self::ServerClosedConnection => -5,
            Self::FailedToEncodeMessage => -6,
            Self::FailedToDecodeMessage => -7,

Copy link
Member

@edif2008 edif2008 left a comment

Choose a reason for hiding this comment

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

Is there any way to easily validate this? Like do you have any flows and setups that would trigger these error codes?

@AndyTitu
Copy link
Contributor Author

Is there any way to easily validate this? Like do you have any flows and setups that would trigger these error codes?

Yes, for example turn the integration setting off from the desktop app and then try to run the SDK with desktop auth method. Or close the desktop app in the middle of the processing.

Copy link
Member

@edif2008 edif2008 left a comment

Choose a reason for hiding this comment

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

Changes look good to me. Thank you for doing this improvement.

@AndyTitu AndyTitu merged commit c383d99 into beta Jan 28, 2026
20 of 32 checks passed
@AndyTitu AndyTitu deleted the andi/improve-error-msg-ret-code branch January 28, 2026 13:41
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