refactor get code to push non-200 errors