fastly / Viceroy

Viceroy provides local testing for developers working with Compute.
https://fastly.dev/learning/compute/testing/#running-a-local-testing-server
Apache License 2.0
140 stars 35 forks source link

Fix trap handling when running components #382

Closed elliottt closed 2 weeks ago

elliottt commented 2 weeks ago

The component implementation didn't have support for either the test-fatalerror-config feature, or the ability to treat the Error::FatalError variant as a trap. This PR fixes that by doing the following:

The remaining difference to the wiggle implementation is that only functions listed in trappable_errors will be able to emit traps for FatalError, though the only case we currently use that in is for test-fatalerror-config, so it seemed reasonable to not switch everything to TrappableError.