Azure / azure-sdk-for-js

This repository is for active development of the Azure SDK for JavaScript (NodeJS & Browser). For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/javascript/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-js.
MIT License
2.09k stars 1.2k forks source link

@azure/core-client RestError at handleErrorResponse: Input string was not in a correct format #27170

Open amberUCP opened 1 year ago

amberUCP commented 1 year ago

Describe the bug The Azure Function returns 500s sporadically with no identified complicating factor in common around the circumstances of the incidents. The associated log references a RestError. Here is the associated stack trace from the logs:

RestError at handleErrorResponse (/home/site/wwwroot/node_modules/@azure/core-client/dist/index.js:1312:19)

Input string was not in a correct format. Report '9764a675-135f-4045-9680-56c334a24168:14:9/19/2023 8:49:03 AM (UTC)' to our forums for assistance or raise a support ticket.

at deserializeResponseBody (/home/site/wwwroot/node_modules/@azure/core-client/dist/index.js:1247:45)

at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

To Reproduce Steps to reproduce the behavior: I have been unable to recreate this error, but have the logs of when it has taken place. It seems to be that the function is in a certain state at a certain time since the errors are in clusters of time and the issue yesterday has multiple logs since the developers were hitting it at the same time to investigate the issue.

Additional context Add any other context about the problem here.

Here is a paste of the logs where this issue has taken place in the past two weeks on one of our Azure Functions:

19/09/2023, 08:44:57.846 Input string was not in a correct format. Report 'd3eb31b9-b3c1-45de-be54-bf16f42a591c:14:9/19/2023 8:44:57 AM (UTC)' to our forums for assistance or raise a support ticket.

19/09/2023, 08:44:34.823 Input string was not in a correct format. Report 'ea52f28e-bbef-4b80-8215-b94d086195b5:14:9/19/2023 8:44:34 AM (UTC)' to our forums for assistance or raise a support ticket.

19/09/2023, 08:44:32.071 Input string was not in a correct format. Report '26b3b9e0-b591-49b1-992b-dd44a9610d46:14:9/19/2023 8:44:32 AM (UTC)' to our forums for assistance or raise a support ticket.

19/09/2023, 08:42:49.964 Input string was not in a correct format. Report 'bea0ed48-dd2c-49b7-96c1-bf09de531faa:14:9/19/2023 8:42:49 AM (UTC)' to our forums for assistance or raise a support ticket.

19/09/2023, 08:40:43.682 Input string was not in a correct format. Report 'ba4e5a66-9c6a-4257-bc0c-69b1e3c98723:14:9/19/2023 8:40:43 AM (UTC)' to our forums for assistance or raise a support ticket.

19/09/2023, 08:38:37.509 Input string was not in a correct format. Report '48f2dc9e-c633-479f-823c-ce43c0b84d8c:14:9/19/2023 8:38:37 AM (UTC)' to our forums for assistance or raise a support ticket.

19/09/2023, 08:37:56.689 Input string was not in a correct format. Report 'b8091da4-892e-4d27-8c12-e1461d760d26:14:9/19/2023 8:37:56 AM (UTC)' to our forums for assistance or raise a support ticket.

19/09/2023, 08:36:55.320 Input string was not in a correct format. Report '99814b3f-8355-4c1d-bed6-78fc51555b14:14:9/19/2023 8:36:55 AM (UTC)' to our forums for assistance or raise a support ticket.

18/09/2023, 10:54:40.508 Input string was not in a correct format. Report 'c89b23af-fbd5-4afd-98fe-c618b8b1cfab:6:9/18/2023 10:54:40 AM (UTC)' to our forums for assistance or raise a support ticket.

18/09/2023, 10:54:25.180 Input string was not in a correct format. Report '618a9166-108b-4ed7-9d2c-bbcc25767443:6:9/18/2023 10:54:25 AM (UTC)' to our forums for assistance or raise a support ticket.

15/09/2023, 07:56:56.055 Input string was not in a correct format. Report '2089d276-8df4-4641-b3c3-10a2a136ea62:14:9/15/2023 7:56:56 AM (UTC)' to our forums for assistance or raise a support ticket.

10/08/2023, 10:37:04.815 Input string was not in a correct format. Report '2d76a283-2085-4aaf-abab-11b931cdee78:2:8/10/2023 10:37:04 AM (UTC)' to our forums for assistance or raise a support ticket.

10/08/2023, 10:37:02.950 Input string was not in a correct format. Report '9ca4c759-98da-4523-a59e-d6202f008ca2:2:8/10/2023 10:37:02 AM (UTC)' to our forums for assistance or raise a support ticket.

10/08/2023, 10:37:02.414 Input string was not in a correct format. Report 'db05fd84-f1dd-4fdf-b07a-265c55748ff5:2:8/10/2023 10:37:02 AM (UTC)' to our forums for

xirzec commented 1 year ago

Hi @amberUCP do you know what service is returning this error? That is to say, do you know which package you are using to make a request that results in this message? I presume you are doing an operation on a particular SDK client that is not handling the service responding with a 500 error.

github-actions[bot] commented 1 year ago

Hi @amberUCP. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

amberUCP commented 1 year ago

Hi, @xirzec The service receiving the 500 is the HTTP function, and it seems to be when calling the send() function in the npm package @azure/eventgrid's EventGridPublisherClient class (though it could be when this class is instantiated or imported). There is further error context on the RestError BadRequest response: { "code": "InvalidSas", "message": "Input string was not in a correct format...."}

It seems intermittent and so unrelated to our implementation, but I wanted to check if it's known bug or if there's something wrong with our application configuration.