Skip to content

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

@dirkam

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions