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

Manually set handleCreate response. #68

Closed
kunerd opened this issue Mar 19, 2015 · 3 comments
Closed

Manually set handleCreate response. #68

kunerd opened this issue Mar 19, 2015 · 3 comments

Comments

@kunerd
Copy link

kunerd commented Mar 19, 2015

Is it possible to set the status code and response text for 'handleCreate'? I try to mock a create request that should produce a validation error on server side, therefor my response should be something like:

status: 422
respsonseText:

{
   errors: {
      attr1: [error1, error2, ...],
      attr2: [error1, error2, ...]
    }
}
@danielspaniel
Copy link
Collaborator

I am working on it now @kunerd, will have something like this later today

@danielspaniel
Copy link
Collaborator

ok @kunerd new version 0.9.11 has this ability to set the status and the errors in the response. Let me know how it goes, or if any problems with this release.

@kunerd
Copy link
Author

kunerd commented Mar 20, 2015

@danielspaniel: Thank you very much. I will try it as soon as possible.

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

No branches or pull requests

2 participants