Skip to content

Add input validation for field length constraints#16

Merged
enaboapps merged 1 commit intomasterfrom
feature/input-validation-6
Feb 16, 2026
Merged

Add input validation for field length constraints#16
enaboapps merged 1 commit intomasterfrom
feature/input-validation-6

Conversation

@enaboapps
Copy link
Owner

Summary

  • Add validate_log_payload() with all API constraint checks
  • Add ValidationError class for clear error reporting
  • Validates message, source, tags, userId, sessionId, requestId, version, dataset, flowId, errorName, errorStack, stepIndex
  • 9 new validation tests

Closes #6

Test plan

  • All 52 tests pass

- Add validate_log_payload() with API constraint checks
- Validate message (1-10000), source (1-100), tags (max 20, each max 50)
- Validate userId/sessionId/requestId (max 100), version/dataset/flowId (max 50)
- Validate errorName (max 200), errorStack (max 10000), stepIndex (0-1000)
- Add ValidationError class exported from package
- Add 9 validation tests

Closes #6

🤖 Auto-generated
@enaboapps enaboapps added this to the v1.1.0 milestone Feb 16, 2026
@enaboapps enaboapps merged commit 63a0d5e into master Feb 16, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 16, 2026

Warning

Rate limit exceeded

@enaboapps has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 14 minutes and 7 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/input-validation-6

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@enaboapps enaboapps deleted the feature/input-validation-6 branch February 16, 2026 10:18
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.

Add input validation for field length constraints

2 participants