Skip to content

Parameter serialization errors are hidden AND incorrect error message #69

@jrgns

Description

@jrgns

I was calling post_market_order but got an ErrMarketUnavailable error.

I double checked the pair value, and it was correct, but after some digging it appeared that the Content Type of the request was 0.

I noticed that this code essentially hides any serialization errors with parameters.

I found my error by running

req = {
# with all my parameters
}

print(json.loads(json.dumps(req)))

This highlighted that I was passing in a Decimal (which can't be serialized).

So, two issues:

  1. ErrMarketUnavailable is sent back if you're not sending any data. Empty request (or something similar) would be a better response
  2. Parameters are emptied without warning, making it difficult for the coder to understand where the issue comes from.

See case 1775940

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