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

add handlers to catch validation errors (specifically arrays) #8

Merged
merged 1 commit into from Apr 3, 2014

Conversation

jessefulton
Copy link
Contributor

If I had an "isInt" validator in my route, but the request came through as an array, the request would hang and eventually time out/500. For example, I had a

    server.get
        url: "/posts"
        swagger:
            summary: "Get posts"
            notes: "..."
            nickname: "Get posts"
        validation:
            before:
                isRequired: false
                isInt: true
                scope: "query"

When called with /posts?before=12345&before=123456, the server would hang. This should address that issue, although I didn't add a ton of test cases...

z0mt3c added a commit that referenced this pull request Apr 3, 2014
add handlers to catch validation errors (specifically arrays)
@z0mt3c z0mt3c merged commit ec3a876 into z0mt3c:master Apr 3, 2014
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.

None yet

2 participants