Skip to content

fix: return {:ok, module} from validate_module callbacks - #41

Merged
cardotrejos merged 1 commit into
cardotrejos:mainfrom
hkedia:main
Jun 21, 2026
Merged

fix: return {:ok, module} from validate_module callbacks#41
cardotrejos merged 1 commit into
cardotrejos:mainfrom
hkedia:main

Conversation

@hkedia

@hkedia hkedia commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

NimbleOptions 1.1.x requires custom validators to return {:ok, value} instead of just :ok. The x402 plug fails to boot with the new nimble_options because Hooks.validate_module/1, Storage.validate_module/1, and Verifier.validate_module/1 return :ok on success.

Update all three validators to return {:ok, module} and adjust the test expectations to match.

NimbleOptions 1.1.x requires custom validators to return
{:ok, value} instead of just :ok. The x402 plug fails to
boot with the new nimble_options because Hooks.validate_module/1,
Storage.validate_module/1, and Verifier.validate_module/1
return :ok on success.

Update all three validators to return {:ok, module} and
adjust the test expectations to match.
@cardotrejos

Copy link
Copy Markdown
Owner

@hkedia thanks for your contribution

@cardotrejos
cardotrejos enabled auto-merge (squash) June 21, 2026 15:33
@cardotrejos
cardotrejos merged commit 54568ae into cardotrejos:main Jun 21, 2026
2 checks passed
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.

2 participants