Dear reader,
You will find some news about this issue. In june I had still some leads to explore about this issue.
First a user credential issue : last year IT migrates the Microsoft tenant. So my first tenant was : myadresseemail@onmicrosoft.com then the IT supplier changed to myadresseemail@mycompany.com
But every flow I did under the first tenant were using the first email adress.
Actually the first email address still appears as a conection on the flow page (see below screenshot).

So the IT supplier suggest we remove the "onmicrosoft" email adress that is used as an alias for my current email address.
Now the old adress is deleted. And the error 502 badgateway doesn't appears.
The old email adress is still displayed on the flow page as a connection
BUT
There is no error 502 bad gateway error !
BUT
I still have error but the flow clearly show what line of the script is not well played.
So it's a little better.
FYI
The message clearly display : We were unable to run the script. Please try again.
Runtime error: Line 4: Cannot read properties of undefined (reading 'delete')
clientRequestId: 8952e9f7-62c3-4d3d-8da4-71fcd43e6a53
I guess the command below is not well written,
The line 4 is in orange.
function main(workbook: ExcelScript.Workbook) {
let etude_des_Missions = workbook.getWorksheet("Etude des Missions");
// Delete worksheet etude_des_Missions
etude_des_Missions.delete();
let etude_des_Feuilles_de_Travaille = workbook.getWorksheet("Etude des Feuilles de Travaille");
I will keep you informed.
See you later.