I am facing below error while uploading file to a GCP bucket. Few records are exceeding (10000000 bytes) allowed by GCP. I have a working Python script to upload file in GCP which uses upload blob functionality. Need to enhance this script to identify & capture records exceeding this limit.
Error: google.cloud.pubsub_v1.publisher.exceptions.MessageTooLargeError: The message being published would produce too large a publish request that would exceed the maximum allowed size on the backend (10000000 bytes).