replaced the abort(...) with json responses --> better error messages for API requests