Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pleroma
pleroma
Commits
11d22874
Commit
11d22874
authored
Oct 25, 2017
by
eal
Browse files
Return error message on errors
parent
813d2eaa
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
View file @
11d22874
...
...
@@ -275,7 +275,10 @@ def follow(%{assigns: %{user: follower}} = conn, params) do
{
:ok
,
activity
}
<-
ActivityPub
.
follow
(
follower
,
followed
)
do
render
conn
,
AccountView
,
"relationship.json"
,
%{
user:
follower
,
target:
followed
}
else
err
->
err
{
:error
,
message
}
=
err
->
conn
|>
put_resp_content_type
(
"application/json"
)
|>
send_resp
(
403
,
Poison
.
encode!
(%{
"error"
=>
message
}))
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment