Display clearer error message when GETing recipient actor fails
This commit is contained in:
parent
78b5bad2c4
commit
bb662e798f
1 changed files with 7 additions and 2 deletions
|
@ -66,7 +66,7 @@ import Yesod.Persist.Core (runDB, get404)
|
|||
import qualified Data.ByteString.Char8 as BC (unpack)
|
||||
import qualified Data.CaseInsensitive as CI (mk)
|
||||
import qualified Data.HashMap.Strict as M (lookup, insert, adjust, fromList)
|
||||
import qualified Data.Text as T (pack, unpack)
|
||||
import qualified Data.Text as T (pack, unpack, concat)
|
||||
import qualified Data.Text.Lazy as TL (toStrict)
|
||||
import qualified Data.Vector as V (length, cons, init)
|
||||
import qualified Network.Wai as W (requestMethod, rawPathInfo, requestHeaders)
|
||||
|
@ -256,7 +256,12 @@ postOutboxR = do
|
|||
eres <- fetchAPID manager actorId h lto
|
||||
case eres of
|
||||
Left s -> do
|
||||
setMessage $ toHtml $ T.pack s
|
||||
setMessage $ toHtml $ T.concat
|
||||
[ "Tried to fetch recipient actor <"
|
||||
, renderFedURI $ l2f h lto
|
||||
, "> and got an error: "
|
||||
, T.pack s
|
||||
]
|
||||
return Nothing
|
||||
Right actor -> do
|
||||
let inbox = actorInbox actor
|
||||
|
|
Loading…
Reference in a new issue