Added .catch next in order to send error when request is malformatted