There are a lot of places where Ably status codes are hard coded. This is not a good practice as we should use static variables instead.
What I suggest is that we create a new class AblyConstants and specify all ably specific status codes used in the app. There are also comments about errors that will be useful for developers.
This is a sample of the current code implementation
callback.onError(new ErrorInfo("Unexpected link URL format", 500, 50000));
This is the suggested solution
callback.onError(new ErrorInfo("Unexpected link URL format", 500, INTERNAL_ERROR_50000));
There are a lot of places where Ably status codes are hard coded. This is not a good practice as we should use static variables instead. What I suggest is that we create a new class AblyConstants and specify all ably specific status codes used in the app. There are also comments about errors that will be useful for developers.
This is a sample of the current code implementation
callback.onError(new ErrorInfo("Unexpected link URL format", 500, 50000));
This is the suggested solution
callback.onError(new ErrorInfo("Unexpected link URL format", 500, INTERNAL_ERROR_50000));
┆Issue is synchronized with this Jira Task by Unito