chore: handle NumberFormatException
Description
This MR handles NumberFormatException in case a response from API couldn't be parsed to an integer.
Issues
https://gitlab.e.foundation/e/os/backlog/-/issues/2299?show=34866
10 commandments of code reviews
Summary by CodeRabbit
-
Bug Fixes
- Improved error handling in the invite sending process to prevent crashes from unexpected string formats.
- Enhanced robustness by returning -1 for invalid error codes instead of throwing exceptions.
Edited by CodeRabbitAI