Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Improved diagnostic for invalid JSON? #77

@sharplet

Description

@sharplet

Sometimes I get an invalid JSON response from the API and it's not clear why (for example, a HTML error page where there would normally be a JSON body). Here's the error message I currently see:

Swish.SwishError.InvalidJSONResponse(Error Domain=NSCocoaErrorDomain Code=3840 "JSON text did not start with array or object and option to allow fragments not set." UserInfo={NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.})

I think it would be useful to see the actual response decoded as a string in this case. Would that be a useful addition to Swish?

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