Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ config :ex_aws,
http_client: ExAws.Request.Req,
json_codec: JSON

config :sentry, client: Sentry.FinchClient
config :sentry, client: Hexdocs.SentryClient

config :logger, :console, format: "[$level] $metadata$message\n"

Expand Down
21 changes: 21 additions & 0 deletions lib/hexdocs/sentry_client.ex
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
defmodule Hexdocs.SentryClient do
@behaviour Sentry.HTTPClient

@impl true
def child_spec do
Supervisor.child_spec({Finch, name: __MODULE__}, id: __MODULE__)
end

@impl true
def post(url, headers, body) do
request = Finch.build(:post, url, headers, body)

case Finch.request(request, __MODULE__) do
{:ok, %Finch.Response{status: status, headers: headers, body: body}} ->
{:ok, status, headers, body}

{:error, error} ->
{:error, error}
end
end
end
1 change: 0 additions & 1 deletion lib/hexdocs/store/store.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ defmodule Hexdocs.Store do
@type opts :: Keyword.t()

@callback get(bucket, key, opts) :: body | nil
@callback list(bucket, prefix) :: [key]
end

defmodule Docs do
Expand Down