Skip to content

debug: logger=debug + try/catch verify_signature - #7

Merged
Taure merged 1 commit into
mainfrom
debug/logger-and-safe-verify
May 24, 2026
Merged

debug: logger=debug + try/catch verify_signature#7
Taure merged 1 commit into
mainfrom
debug/logger-and-safe-verify

Conversation

@Taure

@Taure Taure commented May 24, 2026

Copy link
Copy Markdown
Owner

Two changes to dig into the persistent 401:

  1. Prod logger_level from info to debug so nothing is filtered.
  2. Wrap verify_signature/3 in try/catch with a structured ?LOG_ERROR capturing class/reason/stack + byte sizes. crypto:hash_equals/2 crashes on unequal-length binaries; without this wrap, any sig length mismatch becomes a generic 500 with no log line. Real GitHub deliveries shouldn't trigger this but the safety net + error log makes it visible if they do.

Two complementary changes to surface what is actually going wrong
with webhook verification:

1. prod logger_level: info -> debug. Wider net so nothing is filtered.
2. Wrap gakudan_tickets_github:verify_signature/3 in try/catch with a
   ?LOG_ERROR that captures the crash class/reason/stack and the byte
   sizes of secret/body/sig. crypto:hash_equals/2 raises badarg when
   the two binaries differ in size; without this wrap the handler
   crashes and Nova renders a generic 500, which is what we just saw
   when probing with a short test signature. Real GitHub deliveries
   should not hit this, but the safety net + error log will tell us
   immediately if they do for some reason.
@github-actions

Copy link
Copy Markdown

🔴 Code Coverage — 12.8%

23 of 179 lines covered.


✅ ELP Lint

No diagnostics.

@Taure
Taure merged commit 2034fb9 into main May 24, 2026
16 checks passed
@Taure
Taure deleted the debug/logger-and-safe-verify branch May 24, 2026 09:44
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