improve error message (it's still rubbish though)

This commit is contained in:
Daniel Barlow 2024-11-03 18:47:45 +00:00
parent 1b8293f93e
commit 5f162a95bc

View File

@ -104,15 +104,17 @@ postUploadR = do
defaultLayout [whamlet|<p>#{List.length points} points - thanks!|] defaultLayout [whamlet|<p>#{List.length points} points - thanks!|]
Left e -> Left e ->
defaultLayout defaultLayout
[whamlet|<p>error ] [whamlet|<p>parse error ]
FormMissing -> FormMissing ->
traceShow "missing" $ defaultLayout [whamlet|<p>FormMissing (?)|]
defaultLayout [whamlet|<p>missing|] FormFailure errors ->
FormFailure x -> defaultLayout
traceShow x $ [whamlet|
defaultLayout <h1>Error uploading
[whamlet| <ul>
<p>Nope, sorry $forall err <- errors
<li>#{err}
|] |]
main :: IO () main :: IO ()