question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ActionConfirmOrder.confirm_order does not return interpretable error message

See original GitHub issue

When the order confirmation fails (can be due to eg. tick size being wrong, connection with exchange down, maintenance window etc) the order confirmation fails scilently and returns none.

Changing the code below in action_confirm_order.py will instead return the error message in a dictionary (making it possible for example to get the correct tick size, if that’s the cause of the error)

<original>
        try:
            response_raw = session.send(prepped, verify=False)
            response_raw.raise_for_status()
            response_dict = response_raw.json()
        except Exception as e:
            logger.fatal(response_raw)
            logger.fatal(e)
            return None
</original>
<modified>
        try:
            response_raw = session.send(prepped, verify=False)
            response_dict = response_raw.json()
            response_raw.raise_for_status()
        except Exception as e:
            logger.fatal(response_raw)
            logger.fatal(e)
            return response_dict
</modified>

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Chavithracommented, Jan 6, 2022

Hi, contributions are welcome.

You can make a PR with your code update.

Otherwise will see that later this month.

0reactions
Chavithracommented, Feb 6, 2022

Closing this issue since it is discussed in #54.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found