<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xoyip</author_name>
  <author_url>https://blog.hatena.ne.jp/xoyip/</author_url>
  <blog_title>ぴよログ</blog_title>
  <blog_url>https://xoyip.hatenablog.com/</blog_url>
  <categories>
    <anon>Rails</anon>
    <anon>Grape</anon>
    <anon>API</anon>
    <anon>Ruby</anon>
  </categories>
  <description>RailsでGrapeをっていうgemを使うとちょちょいっとAPIが作れるという話は以前にも書いた。 RailsのGrapeとJbuilderでAPI開発 - PILOG Grapeを使ったAPI実装でのネストやパラメータ - PILOG このときはお試しだったんだけど、今回ちょっと本格的に書くかもという感じになってちゃんとエラー処理とかもしないといけなくなった。それにあたり試行錯誤したことをちょっとメモっておこうと思う。 普通にエラーを返す 以下フォーマットはJSONだとする。 エラーはerror!メソッドによって発生させることができる。error!は例外を使っているようなので呼んだ時点で処…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxoyip.hatenablog.com%2Fentry%2F2014%2F10%2F29%2F153203&quot; title=&quot;Grapeを使ったAPIで独自のエラーコードも一緒に返す工夫 - ぴよログ&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>2014-10-29 15:32:03</published>
  <title>Grapeを使ったAPIで独自のエラーコードも一緒に返す工夫</title>
  <type>rich</type>
  <url>https://xoyip.hatenablog.com/entry/2014/10/29/153203</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
