Exception Type/Name for boto3 network error

How can I know what exceptions to lookout for in a boto3 API call ?

try:
            ec2_client = boto3.client('ec2')
except Exception as e:
            print(f"Error: {e}")
            return JsonResponse({'message': 'An error occurred'}, status=500)
except Boto3Exception as e: # looking for something like Boto3Exception 
            print(f"Error: {e}")
            return JsonResponse({'message': 'A boto3 error occurred'}, status=500)

See Error handling - Boto3 1.28.29 documentation

Side note: With the order that you have these specified, you will never see a Boto3Exception. Exceptions are handled by the first except statement that can handle a particular exception, and Exception will handle everything.
See 8. Errors and Exceptions — Python 3.11.4 documentation