Line(Download a Message Attachment) is unable to retrieve the audio file

"I’m encountering an error when attempting to process audio attachments from Line using Gemini.

Specifically, the Line (Download a Message Attachment) function is unable to retrieve the audio file.

This failure results in an error when Gemini tries to process the data.

This issue does not occur with JPEG file attachments, which download and process successfully.

I suspect there may be a problem with how the Line API handles audio attachment downloads. Could you please investigate?"

Please note that audio content availability in the LINE Messaging API can vary based on factors such as file size and server load.
While the LINE documentation does not specify an exact timeframe, it’s common for audio files to be available shortly after they are sent. If you encounter a 202 Accepted status code when attempting to retrieve the audio content, it indicates that the file is still being processed (The 202 Accepted status code means that the request has been accepted for processing, but the processing has not been finished yet).

In such cases, it’s advisable to implement a Sleep module: wait for a brief period (e.g., a few seconds). This approach helps ensure that you can successfully retrieve the audio file once processing is complete.

On the other hand, you can also add the Break error handler, as this one can try once again if the error is found.

I wanted to thank the Make support team for the thorough response. I found your explanation of the audio processing in the LINE Messaging API and the 202 status code incredibly helpful.


The practical advice about implementing Sleep or Break error handlers was exactly what I needed. Thanks again for your support!"

2 Likes