Skip to content

post_process prints to stdout on error #36

@MarekPikula

Description

@MarekPikula

I use frappe-client in my application and when the response is not JSON (eg. authentication didn't succeed) the library prints the response (website HTML) to the console. My app is a console-based, so this behaviour is highly undesirable, as the library fills the console with content of no significance to the user. I needed to suppress stdout, by using the approach shown here. I'd propose to at least add a flag, which suppresses printing by default and redirect the response handling to the main application in a meaningful way, for example by raising an exception on 401 error.

I'll be working on patch for this, but any feedback would be highly appreciated.

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