You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor(express-wrapper): avoid using codec type-guard
This refactor changes the response code path to try encoding the
service function's response value with the apiSpec's response codec,
and if this errors returns a 500.
Previously we used the codec's type-guard as a test if the codec
can encode the service function's response value, but this step will
take extra time and there's no hard contract that guarantees us the
type-guard returning `true` really means that the codec will be able
to encode a value. Instead, we just try the dangerous deed and do our
best to catch errors.
0 commit comments