removing code duplication and returning bad request reason to response
Merge branch 'yo-pinz' of https://github.com/integrityapplications/pinz into yo-pinz