<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tanaka733</author_name>
  <author_url>https://blog.hatena.ne.jp/tanaka733/</author_url>
  <blog_title>銀の光と碧い空</blog_title>
  <blog_url>https://tech.tanaka733.net/</blog_url>
  <categories>
    <anon>.NET</anon>
    <anon>C#</anon>
    <anon>ASP.NET Core</anon>
  </categories>
  <description>ASP.NET Core Web APIでアプリケーションロジック内では例外を投げておいて、共通処理として例外をキャッチして例外に応じたステータスコードとメッセージのレスポンスを返したい場合があるかと思います。ASP.NET Framework やCore 2.2まであったHttpResponseExceptionを使うようなユースケースです。 docs.microsoft.com ASP.NET Core 3ではなくなっていますが、自前で作ることでより自分のユースケースにあった処理が作れることが次のドキュメントに記載されています。 docs.microsoft.com 今回これをすこしアレン…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.tanaka733.net%2Fentry%2F2020%2F02%2Fuse-exceptions-to-modify-the-response&quot; title=&quot;ASP.NET Core 3 Web 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>2020-02-26 08:00:00</published>
  <title>ASP.NET Core 3 Web APIで例外をスローして、指定したステータスのレスポンスを返す</title>
  <type>rich</type>
  <url>https://tech.tanaka733.net/entry/2020/02/use-exceptions-to-modify-the-response</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
