phase-2: asset register, detail overview, asset picker, attachments

This commit is contained in:
Atharv1705
2026-11-12 12:38:50 +05:30
parent e58232a657
commit ee437e3adf
27 changed files with 4442 additions and 14 deletions
+16
View File
@@ -0,0 +1,16 @@
from fastapi import HTTPException, Request
from fastapi.responses import JSONResponse
class CodedHTTPException(HTTPException):
def __init__(self, status_code: int, detail: str, code: str):
super().__init__(status_code=status_code, detail=detail)
self.code = code
async def coded_http_exception_handler(request: Request, exc: CodedHTTPException) -> JSONResponse:
return JSONResponse(
status_code=exc.status_code,
content={"detail": exc.detail, "code": exc.code},
headers=exc.headers,
)