Skip to content

sendError won't send ErrorResponse on error #27

@alt-romes

Description

@alt-romes

sendError should throw an error which interrupts the request/response cycle with an ErrorResponse.
However, the deadlock fix in 813e665 introduced a bug where we no longer ever send an ErrorResponse when sendError, just crashing the client-connection thread with an error instead.

There are two main situations in which we want to run an Adaptor s r a:

  • When r == (), when unlifting Adaptor for the threads registered in registerNewDebugSession
  • When r == Request, which means we're responding to a Request.

In the former case, there's no well-defined meaning for the sendError thrown error, since we're not responding to any Request -- so we just error on those uncaught errors. OK.

In the latter case, there IS a well-defined meaning for the sendError errors: reply with an ErrorResponse to the client.

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