Archived
20 lines
566 B
Python
20 lines
566 B
Python
from fastapi import HTTPException, status
|
|
|
|
|
|
class NotImplementedException(HTTPException):
|
|
def __init__(self):
|
|
super().__init__(
|
|
status_code=status.HTTP_501_NOT_IMPLEMENTED,
|
|
detail="Not implemented yet",
|
|
)
|
|
|
|
|
|
class FetchException(HTTPException):
|
|
def __init__(
|
|
self, url: str = "", status_code: int = status.HTTP_500_INTERNAL_SERVER_ERROR
|
|
):
|
|
super().__init__(
|
|
status_code=status_code,
|
|
detail=f"Failed to fetch job postings from {url} with status code {status_code}",
|
|
)
|