refactoring specs and add error 500 handle
Merge pull request #2 from i2bskn/refactor-specs

refactoring specs and add error 500 handle