Add error handling for broken payloads