Skip to content

[Android] Net module - only supports success calls? #44

@rafaeliga

Description

@rafaeliga

When my api returns any status code different from 200, I get this error/crash:

--------- beginning of main
--------- beginning of system
(main)> 08-19 15:56:03.087 31788 31952 E br/com/rubythree/hello: Java exception raised: java.io.FileNotFoundException: http://192.168.1.119:3000/api/tokens.json
--------- beginning of crash

My call:

begin
 Net.post(url, options) do |response|
  p response.body
 end
rescue => e
 p e
 p e.message
end

I try to add a begin/rescue blocks, but it didnt work.

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