Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Error Message on ServiceUnavailable #14

Open
1 of 4 tasks
AlexCatarino opened this issue Sep 26, 2022 · 0 comments
Open
1 of 4 tasks

Improve Error Message on ServiceUnavailable #14

AlexCatarino opened this issue Sep 26, 2022 · 0 comments

Comments

@AlexCatarino
Copy link
Member

Expected Behavior

When the service is unavailable, Lean adds this information to the runtime error.

Actual Behavior

When the service is unavailable, Lean creates a brokerage message:
Error - Code: ServiceUnavailable - - Brokerage: TradierBrokerage
but the runtime error is raised by the following API call, which can return an empty message. This results in the following message:
Runtime Error:

Capture

syslog:

2022-09-22T23:41:32.4135621Z ERROR:: TradierBrokerage.Execute.accounts/6YA23301/orders(2): Parameters:  Response: <?xml version='1.0' encoding='UTF-8'?><fault><faultstring>Gateway Timeout</faultstring><detail><errorcode>messaging.adaptors.http.flow.GatewayTimeout</errorcode></detail></fault>
[  ...  Attempts to reconnect ... ]
2022-09-22T23:42:17.1942707Z ERROR:: Brokerage.OnMessage(): Error - Code: ServiceUnavailable - 
2022-09-22T23:42:17.1975736Z TRACE:: CloudLiveTradingResultHandler.BrokerageMessage(): Error - Code: ServiceUnavailable -  - Brokerage: TradierBrokerage
2022-09-22T23:42:17.2036159Z ERROR:: Extensions.SetRuntimeError(): Extensions.SetRuntimeError(): RuntimeError at 9/22/2022 11:42:16 PM UTC. Context: Brokerage Error System.Exception
2022-09-22T23:42:17.2764612Z TRACE:: Tradier.FetchOrders(): No orders found
2022-09-22T23:42:17.6945296Z ERROR:: TradierBrokerage.Execute.accounts/6YA23301/orders(2): Parameters:  Response: 
2022-09-22T23:42:17.6945789Z TRACE:: TradierBrokerage.Execute.accounts/6YA23301/orders(2): Attempting again...
2022-09-22T23:42:17.8017087Z ERROR:: AlgorithmManager.Run(): Stopping, encountered a runtime error at 9/22/2022 11:42:17 PM UTC.

System Information

Live trading in QuantConnect Cloud.

Checklist

  • I have completely filled out this template
  • I have confirmed that this issue exists on the current master branch
  • I have confirmed that this is not a duplicate issue by searching issues
  • I have provided detailed steps to reproduce the issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant