[go: up one dir, main page]

Skip to content

Random error sending Telegram notification

Description

The Telegram API complains about sending the announcement URL.

Logs

2022-01-20T13:24:35.010+00:00	START RequestId: 1cdb9008-c7f3-4f42-a1f1-e421f1127cc5 Version: $LATEST
2022-01-20T13:24:35.010+00:00	Initializing...
2022-01-20T13:24:35.010+00:00	Ready!
2022-01-20T13:24:35.015+00:00	A new message has arrived!
2022-01-20T13:24:35.015+00:00	Sending new announcement to "@nombramientos_profesores" Telegram channel...
2022-01-20T13:24:37.788+00:00	error sending notification to Telegram, unexpected 400 status code! Bad Request: failed to get HTTP URL content: wrapError null
2022-01-20T13:24:37.789+00:00	END RequestId: 1cdb9008-c7f3-4f42-a1f1-e421f1127cc5
2022-01-20T13:24:37.789+00:00	REPORT RequestId: 1cdb9008-c7f3-4f42-a1f1-e421f1127cc5 Duration: 2774.95 ms Billed Duration: 2775 ms Memory Size: 128 MB Max Memory Used: 39 MB Init Duration: 97.00 ms 

Possible solution

  1. Handle the error
  2. Download the announcement document to the /tmp directory
  3. Send the downloaded document instead of the document URL