add errors from response and refactor crud