<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>오류 처리 on 얼쑤 · Team Edo</title><link>https://team-edo.github.io/tags/%EC%98%A4%EB%A5%98-%EC%B2%98%EB%A6%AC/</link><description>Recent content in 오류 처리 on 얼쑤 · Team Edo</description><generator>Hugo</generator><language>ko-kr</language><lastBuildDate>Wed, 28 Oct 2026 00:00:00 +0900</lastBuildDate><atom:link href="https://team-edo.github.io/tags/%EC%98%A4%EB%A5%98-%EC%B2%98%EB%A6%AC/index.xml" rel="self" type="application/rss+xml"/><item><title>분석 오류 응답과 로그에서 서명 URL 숨기기</title><link>https://team-edo.github.io/posts/2026/10/keep-signed-urls-out-of-analysis-errors/</link><pubDate>Wed, 28 Oct 2026 00:00:00 +0900</pubDate><guid>https://team-edo.github.io/posts/2026/10/keep-signed-urls-out-of-analysis-errors/</guid><description>&lt;p>얼쑤의 분석 서버는 요청에 담긴 서명 URL로 녹음을 내려받습니다. URL에 읽기 권한이 담겨 있어 유효 시간 안에는 주소만으로 파일을 요청할 수 있습니다. 분석 API를 구현할 때 이 주소가 어디에 남는지 점검했습니다. 제가 작성한 코드에서 URL을 로그에 쓰지 않아도 두 곳에 남을 수 있었습니다. 요청을 검증하는 프레임워크의 응답과 녹음을 내려받는 HTTP 라이브러리의 로그입니다.&lt;/p>
&lt;h2 id="bpm을-틀리게-보냈을-때는-문제가-드러나지-않았다">BPM을 누락해야 드러난 응답 노출&lt;/h2>
&lt;p>당시 FastAPI 기본 검증 응답은 HTTP 422와 함께 오류가 난 입력값을 &lt;code>input&lt;/code>에 넣었습니다. &lt;code>bpm&lt;/code>에 0을 보내면 오류의 입력값도 0이었습니다. 이 경우만 검사하면 기존 처리기를 써도 서명 URL이 응답에 없었습니다. &lt;code>bpm&lt;/code>을 아예 빼자 검증기가 그 필드가 있어야 할 요청 객체를 오류에 담았습니다. 같은 객체의 &lt;code>audioUrl&lt;/code>도 응답에 실릴 수 있었습니다.&lt;/p></description></item></channel></rss>