Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/logflare_web/controllers/api/backend_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ defmodule LogflareWeb.Api.BackendController do
conn
|> json(%{connected?: true})

{:error, _reason} ->
{:error, reason} ->
conn
|> json(%{connected?: false})
|> json(%{connected?: false, reason: reason})
Comment thread
Ziinc marked this conversation as resolved.
Outdated
end
end
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ defmodule LogflareWeb.Api.BackendControllerTest do
|> post("/api/backends/#{backend.token}/test")
|> json_response(200)

assert response == %{"connected?" => false}
assert response == %{"connected?" => false, "reason" => "some_reason"}
end

test "returns 404 if backend doesn't exist or doesn't belong to user", %{
Expand Down
Loading