Skip to content

Error frames with no error_code carrying general warnings should not be treated as hard errors #766

Description

@tradatious

When the TWS/IB Gateway API setting "Reject messages above maximum allowed message rate vs applying pacing" setting is ticked, the following error frame with no error_code may be sent:

Warning: Approaching max rate of 50 messages per second (42)

As IB's Understanding Message Codes doc says, the error path is also used to send warnings or informative messages, so this isn't unexpected.

However, right now ibapi treats an error frame with no error_code as a hard error and terminates requests. decode_error_envelope defaults the missing code to 0 and classify_error only checks is_warning_error(error_code) for specific code, not including the defaulted 0.

As a result, a request-less code-less frame takes the NoticeAndFailOneShots arm which fail-fasts every in-flight one-shot shared request (server_time, managed_accounts, next_valid_order_id,market_rule, etc.). Clearly undesirable for a warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions