<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Http-Status on Ghafoor's Personal Blog</title><link>http://ghafoorsblog.com/tags/http-status/</link><description>Recent content in Http-Status on Ghafoor's Personal Blog</description><generator>Hugo</generator><language>en</language><managingEditor>noreply@example.com (AG Sayyed)</managingEditor><webMaster>noreply@example.com (AG Sayyed)</webMaster><copyright>Copyright © 2024-2026 AG Sayyed. All Rights Reserved.</copyright><lastBuildDate>Sat, 16 May 2026 17:42:12 +0100</lastBuildDate><atom:link href="http://ghafoorsblog.com/tags/http-status/index.xml" rel="self" type="application/rss+xml"/><item><title>Error Handling</title><link>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/006-error-handling/</link><pubDate>Fri, 25 Jul 2025 00:00:00 +0000</pubDate><author>noreply@example.com (AG Sayyed)</author><guid>http://ghafoorsblog.com/courses/ibm/fullstack-content/fullstack-pcert/08-ai-apps-python-flask/02-module/006-error-handling/</guid><description>&lt;p class="lead text-primary"&gt;
This document covers HTTP status codes, error handling in Flask, and best practices for returning error responses from API endpoints. It explains status code categories, custom error responses, and application-level error handlers for robust API design.
&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="understanding-http-status-codes"&gt;Understanding HTTP Status Codes&lt;/h2&gt;
&lt;p&gt;Every HTTP response includes a three-digit status code that indicates the result of the request. Status codes are grouped into categories:&lt;/p&gt;
&lt;table&gt;
 &lt;thead&gt;
 &lt;tr&gt;
 &lt;th&gt;Code Range&lt;/th&gt;
 &lt;th&gt;Category&lt;/th&gt;
 &lt;th&gt;Description&lt;/th&gt;
 &lt;/tr&gt;
 &lt;/thead&gt;
 &lt;tbody&gt;
 &lt;tr&gt;
 &lt;td&gt;100–199&lt;/td&gt;
 &lt;td&gt;Informational&lt;/td&gt;
 &lt;td&gt;Request received, continuing process&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;200–299&lt;/td&gt;
 &lt;td&gt;Success&lt;/td&gt;
 &lt;td&gt;Request received and processed successfully&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;300–399&lt;/td&gt;
 &lt;td&gt;Redirection&lt;/td&gt;
 &lt;td&gt;Further action needed to complete request&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;400–499&lt;/td&gt;
 &lt;td&gt;Client Error&lt;/td&gt;
 &lt;td&gt;Error in the request from the client&lt;/td&gt;
 &lt;/tr&gt;
 &lt;tr&gt;
 &lt;td&gt;500–599&lt;/td&gt;
 &lt;td&gt;Server Error&lt;/td&gt;
 &lt;td&gt;Error on the server side&lt;/td&gt;
 &lt;/tr&gt;
 &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Common codes include:&lt;/p&gt;</description></item></channel></rss>