diff options
author | Daniel Schadt <kingdread@gmx.de> | 2021-06-30 13:57:34 +0200 |
---|---|---|
committer | Daniel Schadt <kingdread@gmx.de> | 2021-06-30 13:57:34 +0200 |
commit | 04292d18c8ddd394acd683662caa9f848eced9d3 (patch) | |
tree | 04eb21dbef472eb32245cf700d475fbaf5434267 /test/Spec.hs | |
parent | 6e2e977dcf5ca288be9f4207723211692f4b1e08 (diff) | |
download | Cana-04292d18c8ddd394acd683662caa9f848eced9d3.tar.gz Cana-04292d18c8ddd394acd683662caa9f848eced9d3.tar.bz2 Cana-04292d18c8ddd394acd683662caa9f848eced9d3.zip |
Give a reply to the server if a route fails
Otherwise, the server will never get a reply and instead we'll just
silently let the client timeout :-(
This change introduces the function "uncatch", which makes an error the
inner Cana computation explicit by returning the Either directly.
With the way this is written currently, we could probably get away with
using "catch" as well, along the lines of
r geminiRequest `catch` (const $ writeResponse context ...)
Diffstat (limited to 'test/Spec.hs')
0 files changed, 0 insertions, 0 deletions