From 15416e6db50c86dc84d00f7ee213e176ab5ee154 Mon Sep 17 00:00:00 2001 From: Chidwan3578 Date: Mon, 12 Jan 2026 00:03:30 +0530 Subject: [PATCH] updated the required item MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changes Made: Added AlertTriangle icon import — for the Error Reference tab icon Created ErrorTable component — helper component similar to ParamTable to display error status codes in a table format Added new "errors" case in the renderContent() switch statement with: A title and description A table listing all 5 error status codes with their descriptions: 400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found 500 Internal Server Error Added "Error Reference" tab to the sidebar navigation — positioned after "Introduction" and before "Limits & Quotas" The Error Reference section is now accessible from the sidebar and displays the status codes in a table matching the existing documentation style. The section appears after the Introduction tab, providing users with error information early in the documentation flow. --- frontend/src/pages/Docs.jsx | 48 +++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) diff --git a/frontend/src/pages/Docs.jsx b/frontend/src/pages/Docs.jsx index a729c7296..278fd7225 100644 --- a/frontend/src/pages/Docs.jsx +++ b/frontend/src/pages/Docs.jsx @@ -1,5 +1,5 @@ import { useState } from 'react'; -import { Copy, Terminal, Database, Shield, HardDrive, Check, Server, Menu, X, ChevronDown, AlertCircle, Zap } from 'lucide-react'; +import { Copy, Terminal, Database, Shield, HardDrive, Check, Server, Menu, X, ChevronDown, AlertCircle, Zap, AlertTriangle } from 'lucide-react'; import { API_URL } from '../config'; import Footer from '../components/Layout/Footer'; @@ -88,6 +88,28 @@ console.log(data); ); + // Helper for Error Status Codes Table + const ErrorTable = ({ errors }) => ( +
+ + + + + + + + + {errors.map((e, i) => ( + + + + + ))} + +
Status CodeDescription
{e.code}{e.desc}
+
+ ); + const renderContent = () => { switch (activeTab) { case 'intro': @@ -131,6 +153,27 @@ console.log(data); ); + case 'errors': + return ( +
+

Error Reference

+

+ Common HTTP status codes and their meanings when making API requests. +

+ +

+ Status Codes +

+ +
+ ); + case 'limits': return (
@@ -359,7 +402,8 @@ console.log("File URL:", result.url);