<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Code-Translator on 設計パターンを疑え</title><link>https://www.nqou.net/tags/code-translator/</link><description>Recent content in Code-Translator on 設計パターンを疑え</description><generator>Hugo -- gohugo.io</generator><language>ja</language><lastBuildDate>Sat, 05 Dec 2026 07:07:05 +0900</lastBuildDate><atom:link href="https://www.nqou.net/tags/code-translator/index.xml" rel="self" type="application/rss+xml"/><item><title>日付はチェックしていたのに、存在しない日付の予約が保存された</title><link>https://www.nqou.net/2026/12/05/070705/</link><pubDate>Sat, 05 Dec 2026 07:07:05 +0900</pubDate><guid>https://www.nqou.net/2026/12/05/070705/</guid><description>&lt;img src="https://www.nqou.net/public_images/2026/code-translator-parse-dont-validate-boundary/header.webp" alt="Featured image of post 日付はチェックしていたのに、存在しない日付の予約が保存された" /&gt;&lt;h2 id="止まった集計"&gt;止まった集計
&lt;/h2&gt;&lt;p&gt;予約の窓口（API）が、存在しない日付「2027年2月30日」の予約を保存した。その夜、市の利用実績の集計が止まった。日付のチェック（検査）は、私が先週、自分の手で足したばかりだった。&lt;/p&gt;</description></item><item><title>APIが500とDBのエラーを返し、ユーザーの画面にそのまま出た</title><link>https://www.nqou.net/2026/12/04/070705/</link><pubDate>Fri, 04 Dec 2026 07:07:05 +0900</pubDate><guid>https://www.nqou.net/2026/12/04/070705/</guid><description>&lt;img src="https://www.nqou.net/public_images/2026/code-translator-problem-details-error-response/header.webp" alt="Featured image of post APIが500とDBのエラーを返し、ユーザーの画面にそのまま出た" /&gt;&lt;h2 id="届いたメール"&gt;届いたメール
&lt;/h2&gt;&lt;p&gt;市の施設予約の画面に、住民が見るはずのない一文が出た。&lt;code&gt;UNIQUE constraint failed&lt;/code&gt; で始まる、データベースの制約違反の文だ。予約の窓口（API）は、失敗をすべて 500 と内部の例外文で返していた。市の公式アプリは理由を見分けられず、その文が画面に出てしまった。&lt;/p&gt;</description></item><item><title>コード通訳 シリーズ目次【困りごとから探す案内板】</title><link>https://www.nqou.net/2026/12/04/060705/</link><pubDate>Fri, 04 Dec 2026 06:07:05 +0900</pubDate><guid>https://www.nqou.net/2026/12/04/060705/</guid><description>&lt;img src="https://www.nqou.net/public_images/2026/code-translator-index/header.webp" alt="Featured image of post コード通訳 シリーズ目次【困りごとから探す案内板】" /&gt;&lt;p&gt;「コード通訳」は、API（窓口）が使う側に何を、どこまで約束するのかを扱う連載です。地方都市の古いビルにある二人だけの仲介事務所で、元会議通訳の渡瀬さんと見習いの小野寺さんが、市の公共施設予約サービスの窓口を、使っているすべての相手が頼れる約束へ育てていきます。語り手は小野寺さんです。実装は Rust で、&lt;code&gt;http&lt;/code&gt;・&lt;code&gt;serde&lt;/code&gt;・&lt;code&gt;serde_json&lt;/code&gt; だけを使い、&lt;code&gt;cargo test&lt;/code&gt; で確かめます。&lt;/p&gt;</description></item></channel></rss>