Commit e1dabf86 authored by TheTechRobo's avatar TheTechRobo
Browse files

Fix 500 error when invalid ID is passed o API

parent 8c829a4d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -22,7 +22,10 @@ async def wrapperYT(id, includeRaw):
    """
    Wrapper for generate
    """
    try:
        return await lostmediafinder.YouTubeResponse.generate(id, includeRaw)
    except lostmediafinder.types.InvalidVideoIdError:
        return {"status": "bad.id", "id": None}

async def wrapperYTS(id, includeRaw):
    """