<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: ronnyjubhari</title>
    <description>The latest articles on DEV Community by ronnyjubhari (@ronnyjubhari).</description>
    <link>https://dev.to/ronnyjubhari</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1131999%2F75312c37-c9de-483e-8982-ad7a40615a0e.png</url>
      <title>DEV Community: ronnyjubhari</title>
      <link>https://dev.to/ronnyjubhari</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ronnyjubhari"/>
    <language>en</language>
    <item>
      <title>How return a JSON response instead of an HTML error code like 401 or 400</title>
      <dc:creator>ronnyjubhari</dc:creator>
      <pubDate>Thu, 03 Aug 2023 04:00:47 +0000</pubDate>
      <link>https://dev.to/ronnyjubhari/how-return-a-json-response-instead-of-an-html-error-code-like-401-or-400-1pnp</link>
      <guid>https://dev.to/ronnyjubhari/how-return-a-json-response-instead-of-an-html-error-code-like-401-or-400-1pnp</guid>
      <description>&lt;p&gt;Hello guys, i need help&lt;/p&gt;

&lt;p&gt;with following the tutorial in this link ‘&lt;a href="https://medium.com/geekculture/implementing-json-web-token-jwt-authentication-using-spring-security-detailed-walkthrough-1ac480a8d970%E2%80%99"&gt;https://medium.com/geekculture/implementing-json-web-token-jwt-authentication-using-spring-security-detailed-walkthrough-1ac480a8d970’&lt;/a&gt;, i can create jwt token authorization but how to return json response instead of an HTML error code like 401 or 400 when the JWT token is not valid, expired, or not used ?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zEhMyzl4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m3tpzp53d0u7ubvvc838.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zEhMyzl4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m3tpzp53d0u7ubvvc838.png" alt="Image description" width="800" height="492"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--a5Hxsv1n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hndk5uaaut9f9qz3vy1b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--a5Hxsv1n--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hndk5uaaut9f9qz3vy1b.png" alt="Image description" width="800" height="498"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>springboot</category>
      <category>json</category>
      <category>api</category>
    </item>
  </channel>
</rss>
