Merge branch 'master', remote-tracking branch 'origin' into release_v1.9.47

This commit is contained in:
Favour Ohans 2023-11-17 12:17:35 +01:00
commit 97a8a40df4

View File

@ -111,8 +111,12 @@ public class OpenAiPlugin extends BasePlugin {
if (HttpStatusCode.valueOf(401).isSameCodeAs(statusCode)) {
actionExecutionResult.setIsExecutionSuccess(false);
actionExecutionResult.setErrorInfo(
new AppsmithPluginException(AppsmithPluginError.PLUGIN_AUTHENTICATION_ERROR));
String errorMessage = "";
if (responseEntity.getBody() != null && responseEntity.getBody().length > 0) {
errorMessage = new String(responseEntity.getBody());
}
actionExecutionResult.setErrorInfo(new AppsmithPluginException(
AppsmithPluginError.PLUGIN_AUTHENTICATION_ERROR, errorMessage));
return Mono.just(actionExecutionResult);
}