Skip to content

com.baasbox.android.BaasIOException: java.net.SocketTimeoutException #35

Description

@dirkam

0.9.1 Server with 0.9.2 SDK
How should I handle SocketTimeoutException?

If I call a plugin endpoint

try {
BaasBox box = BaasBox.getDefault();
            box.rest(HttpRequest.POST,
                    "plugin/my.plugin",
                    new JsonObject().put("", ""),
                    true,
                    new BaasHandler<JsonObject>() {
                        @Override
                        public void handle(BaasResult<JsonObject> res) {

                        }
                    });
        }  catch (Exception ex) {
ex.printStackTrace(); }

then I can catch SocketTimeoutException and handle it, but if I use some of the native calls:

try {
BaasDocument.fetchAll(“mycollection”,
    new BaasHandler<List<BaasDocument>>() {
    @Override
        public void handle(BaasResult<List<BaasDocument>> res) {

                        }
                    });
        }  catch (Exception ex) {
ex.printStackTrace(); }

then it crashes with SocketTimeoutException

Activity

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