Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix send_event typespec #545

Merged
merged 1 commit into from
Jul 11, 2023
Merged
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
5 changes: 2 additions & 3 deletions lib/sentry/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ defmodule Sentry.Client do
require Logger

@type send_event_result ::
{:ok, Task.t() | String.t() | pid()} | {:error, any()} | :unsampled | :excluded
{:ok, Task.t() | String.t()} | {:error, any()} | :unsampled | :excluded
@type dsn :: {String.t(), String.t(), String.t()}
@type result :: :sync | :none | :async
@sentry_version 5
Expand Down Expand Up @@ -155,8 +155,7 @@ defmodule Sentry.Client do
end
end

@spec do_send_event(Event.t(), binary(), :none) ::
{:ok, DynamicSupervisor.on_start_child()} | {:error, any()}
@spec do_send_event(Event.t(), binary(), :none) :: {:ok, String.t()} | {:error, any()}
defp do_send_event(event, body, :none) do
case get_headers_and_endpoint() do
{endpoint, auth_headers} when is_binary(endpoint) ->
Expand Down