Zaid-Ajaj / Fable.Remoting

Type-safe communication layer (RPC-style) for F# featuring Fable and .NET Apps
https://zaid-ajaj.github.io/Fable.Remoting/
MIT License
272 stars 54 forks source link

Expose the request body to the error handler #240

Closed kerams closed 3 years ago

kerams commented 3 years ago

While this is technically a breaking change, I reckon it's worth adding. It allows the user to log the entire request body (if it was JSON), which is not only helpful for diagnosing general application errors, but especially so in cases when the input is malformed and not deserializable internally by Fable.Remoting (for whatever reason).

kerams commented 3 years ago

Not a breaking change anymore :).

Zaid-Ajaj commented 3 years ago

Hi @kerams, this looks like a nice addition to the error handler since it has access to the context (unlike the diagnosticsLogger)

I was just going to ask you to add the property to the RouteInfo but you already did it 😍

I will merge it and publish ASAP

Zaid-Ajaj commented 3 years ago

Published the packages 🚀 you should be able to update to latest to get the goodies