Fetch Js Error Handling In Python