ES /docs

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 StandardErrorrescue RestClient::Exceptionrescue 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::Exception rescue 블록에서 e.response&.bodyerror_body 변수에 저장하고 Cupix::Logger.errorresponse: 키워드로 포함
  • 기존 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 변경만 해당)