iSpring account creation failed: 400 Bad Request
Fix Plan: iSpring account creation failed: 400 Bad Request
Changes#
tesla: app/operations/ispring_operation.rb#
- What:
create_user메서드(line 36)의rescue StandardError를rescue RestClient::Exception과rescue StandardError로 분리하여,RestClient::Exception발생 시e.response&.body를 로그에 포함시킨다. 동일 파일의update_user_role(line 70-72) 및create_department(line 110-112) 패턴을 그대로 적용한다. - Why: 현재
create_user의 rescue 블록은 iSpring API의 HTTP 응답 본문(거부 사유)을 로깅하지 않아, 400 Bad Request의 구체적 원인(중복 계정 등)을 진단할 수 없다. - Lines: 33-43
Acceptance Criteria#
-
create_user메서드에rescue RestClient::Exception => e블록이rescue StandardError => e앞에 존재 -
RestClient::Exceptionrescue 블록에서e.response&.body를error_body변수에 저장하고Cupix::Logger.error에response:키워드로 포함 - 기존
rescue StandardError => e블록이 별도로 유지되어 non-HTTP 에러도 처리 -
update_user_role(line 70-85) 및create_department(line 110-125)의 두 단계 rescue 패턴과 동일한 구조
Tests#
- 기존 테스트: Sorbet 미적용 파일.
ruby -c app/operations/ispring_operation.rb로 구문 검증. - 신규 테스트: 없음 (observability 변경만 해당)