Http Connection Android SDK handeling Http 400 and 500 Error Codes
  • Hi karim,

    I am using android sdk , my question is :

    Does Android SDK of apstrata handles Http connection errors in the app when we can't reach the server(no connection is available).?

    Do you think if not available, we need to inherit Http Connection class that handles these errors when creating the conncetion and client of apstrata.

    Thank you.
  • Hi Nour,

    Errors stemming from the execution of Apstrata APIs or from your server-side scripts are wrapped into the metadata attribute of the returned response. The metadata attribute contains the status, errorCode and errorDetail fields to inform you of any error.

    As for errors stemming from the connection to Apstrata, these usually result in an exception that is thrown by the method you are invoking on the connection class.

    This said, if you would like to enhance this behavior, do not hesitate to extend the class :)


Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!