replace 500 code with 400
Merge pull request #39 from gkorland/patch-1

replace 500 code with 400