mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-30 23:06:10 +03:00
Fix errors.
This commit is contained in:
parent
ac153f6494
commit
499390aeae
@ -407,8 +407,21 @@ requestRaw request__ expect =
|
||||
)
|
||||
)
|
||||
|> toResult
|
||||
|> DataSource.mapError (\error -> Exception.Catchable error "TODO - error message here")
|
||||
|> DataSource.mapError
|
||||
(\error ->
|
||||
Exception.Catchable error (errorToString error)
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
errorToString : Pages.StaticHttpRequest.Error -> String
|
||||
errorToString error =
|
||||
case error of
|
||||
Pages.StaticHttpRequest.DecoderError string ->
|
||||
string
|
||||
|
||||
Pages.StaticHttpRequest.UserCalledStaticHttpFail string ->
|
||||
string
|
||||
|
||||
|
||||
{-| -}
|
||||
|
@ -305,11 +305,11 @@ all =
|
||||
"toJsPort"
|
||||
(Codec.decoder (ToJsPayload.successCodecNew2 "" ""))
|
||||
(expectErrorsPort
|
||||
"""-- CALLED STATIC HTTP FAIL ----------------------------------------------------- elm-pages
|
||||
"""-- INTERNAL ERROR ----------------------------------------------------- elm-pages
|
||||
|
||||
|
||||
|
||||
I ran into a call to `DataSource.fail` with message: String was not uppercased"""
|
||||
String was not uppercased"""
|
||||
)
|
||||
, test "POST method works" <|
|
||||
\() ->
|
||||
@ -392,7 +392,7 @@ I ran into a call to `DataSource.fail` with message: String was not uppercased""
|
||||
"toJsPort"
|
||||
(Codec.decoder (ToJsPayload.successCodecNew2 "" ""))
|
||||
(expectErrorsPort
|
||||
"""-- STATIC HTTP DECODING ERROR ----------------------------------------------------- elm-pages
|
||||
"""-- INTERNAL ERROR ----------------------------------------------------- elm-pages
|
||||
|
||||
Problem with the given value:
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user