Skip to content

feat(skills-next): add elixir SDK references#241

Open
evanpurkhiser wants to merge 1 commit into
mainfrom
evanpurkhiser/feat-skills-next-add-elixir-sdk-references
Open

feat(skills-next): add elixir SDK references#241
evanpurkhiser wants to merge 1 commit into
mainfrom
evanpurkhiser/feat-skills-next-add-elixir-sdk-references

Conversation

@evanpurkhiser

Copy link
Copy Markdown
Member

Direct LLM port of the existing elixir SDK skill into the skills-next per-SDK reference layout under skills-next/references/sdks/elixir/. This content has NOT been reviewed at all — it is a machine-generated port of the existing SDK skill, and every file should be treated as unverified.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 8059788. Configure here.

```elixir
# lib/my_app/application.ex
def start(_type, _args) do
Logger.add_handlers(:my_app) # activates the :sentry_handler configured above

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logger handler wrong config app

Medium Severity

The Quick Start nests Sentry.LoggerHandler under config :sentry, logger: [...] but activates handlers with Logger.add_handlers(:my_app). Elixir only loads :logger handlers from the OTP app passed to add_handlers, so the handler block is never applied and crash forwarding stays disabled.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 8059788. Configure here.

Comment thread skills-next/references/sdks/elixir/index.md Outdated
Comment thread skills-next/references/sdks/elixir/index.md
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-skills-next-add-elixir-sdk-references branch from 8059788 to 32d72fc Compare July 2, 2026 21:14
Returns {:ok, result} or {:error, exception}.
"""
def monitor(slug, fun, monitor_config \\ []) do
{:ok, check_in_id} = Sentry.capture_check_in(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The pattern match on the result of Sentry.capture_check_in is non-exhaustive. It doesn't handle the documented :ignored or {:error, _} return values, which will cause a MatchError.
Severity: HIGH

Suggested Fix

Update the example code to handle all possible return values from Sentry.capture_check_in/1. Use a case statement to pattern match on {:ok, check_in_id}, :ignored, and {:error, _} to prevent MatchError exceptions and handle each case gracefully.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills-next/references/sdks/elixir/crons.md#L114

Potential issue: The example code for the `monitor/3` helper function uses a
non-exhaustive pattern match: `{:ok, check_in_id} = Sentry.capture_check_in(...)`. The
`Sentry.capture_check_in/1` function is documented to also return `:ignored` or
`{:error, _}` in common scenarios, such as when a DSN is not configured or the
environment is filtered. If these values are returned, the pattern match will fail and
raise a `MatchError`, crashing the process. Since this is example code intended for
developers to copy, it creates a risk of production crashes in their applications if
they use it directly.

@dingsdax dingsdax requested a review from sl0thentr0py July 6, 2026 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant