Modify JSON bodyparser for adequate error handling