<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>int128</author_name>
  <author_url>https://blog.hatena.ne.jp/int128/</author_url>
  <blog_title>GeekFactory</blog_title>
  <blog_url>https://int128.hatenablog.com/</blog_url>
  <categories>
    <anon>rest</anon>
    <anon>spring</anon>
  </categories>
  <description>REST APIを設計する場合に、エラーをどのステータスコードで返却するか議論になることがあります。例えば、以下のような場合が挙げられます。 キー指定のリクエストでDBにデータがない場合（例： GET /books/1 ） 一覧のリクエストでDBにデータがない場合（例： GET /books ） 必須項目がない、型が合わないといった場合（例： GET /books/find?count=bar ） ビジネスルールに違反する場合（例： POST /purchase ） 実行時エラー（例： NullPointerException ） クライアントが適切にエラーを処理できるように、レスポンスにエラ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fint128.hatenablog.com%2Fentry%2F2016%2F09%2F17%2F180950&quot; title=&quot;REST APIの例外設計 - GeekFactory&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2016-09-17 18:09:50</published>
  <title>REST APIの例外設計</title>
  <type>rich</type>
  <url>https://int128.hatenablog.com/entry/2016/09/17/180950</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
