fiberplane / fpx

Supercharge your local development
https://fiberplane.dev
MIT License
43 stars 1 forks source link

Implement From<anyhow::Error> for ApiServerError<E> #64

Closed hatchan closed 2 months ago

hatchan commented 2 months ago

This allows us to easily write code that uses anyhow::Error. If it is returned it will be converted into a ApiServerError, while also being logged and will result in a InternalServerError to the client.

Note that this should only be used as a last resort situation. Creating typed errors is recommended over this.