Skip to content

WASM error handling in SubtleCrypto through web worker #69740

@AaronRobinsonMSFT

Description

@AaronRobinsonMSFT

The work to enable WASM to use SubtleCrypto, #65966, had some follow ups on how to handle error cases. Specifically, the communication channel with the web worker could be hardened to convey more errors/failures. This could be accomplished through throwing an exception or the web worker communicating a failure case explicitly.

Source hints:

  • crypto-worker.ts
    • see read_response and consider throwing an error.
  • dotnet-crypto-worker.js
    • The reading in of a request could be including in the try/catch in await_request.
    • The await_request function could return a bespoke "error occurred" message instead of an exception string.

See #69741

/cc @radical @ericstj @layomia

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions