Increase error body max length before truncation (#3762)

This commit is contained in:
eric sciple
2025-03-20 20:09:00 -05:00
committed by GitHub
parent 6654f6b3de
commit dc9695f123
2 changed files with 24 additions and 3 deletions

View File

@@ -253,11 +253,12 @@ namespace GitHub.Actions.RunService.WebApi
return false;
}
private static string Truncate(string errorBody)
internal static string Truncate(string errorBody)
{
if (errorBody.Length > 100)
const int maxLength = 200;
if (errorBody.Length > maxLength)
{
return errorBody.Substring(0, 100) + "[truncated]";
return errorBody.Substring(0, maxLength) + "[truncated]";
}
return errorBody;