Skip to content

Commit

Permalink
[improve][fn][branch-3.0] Add missing "exception" argument to some `l…
Browse files Browse the repository at this point in the history
…og.error` (apache#22140) (apache#22213)
  • Loading branch information
jiangpengcheng authored Mar 7, 2024
1 parent e2316bc commit dc035f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ private static URI initializeStandaloneWorkerService(PulsarClientCreator clientC
log.warn("Retry to connect to Pulsar service at {}", workerConfig.getPulsarWebServiceUrl());
if (retries >= maxRetries) {
log.error("Failed to connect to Pulsar service at {} after {} attempts",
workerConfig.getPulsarFunctionsNamespace(), maxRetries);
workerConfig.getPulsarFunctionsNamespace(), maxRetries, e);
throw e;
}
retries++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ public String triggerFunction(final String tenant,
try {
worker().getBrokerAdmin().topics().getSubscriptions(inputTopicToWrite);
} catch (PulsarAdminException e) {
log.error("Function in trigger function is not ready @ /{}/{}/{}", tenant, namespace, functionName);
log.error("Function in trigger function is not ready @ /{}/{}/{}", tenant, namespace, functionName, e);
throw new RestException(Status.BAD_REQUEST, "Function in trigger function is not ready");
}
String outputTopic = functionMetaData.getFunctionDetails().getSink().getTopic();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void registerFunction(final String tenant,
worker().getFunctionRuntimeManager().getRuntimeFactory().doAdmissionChecks(functionDetails);
} catch (Exception e) {
log.error("{} {}/{}/{} cannot be admitted by the runtime factory",
ComponentTypeUtils.toString(componentType), tenant, namespace, functionName);
ComponentTypeUtils.toString(componentType), tenant, namespace, functionName, e);
throw new RestException(Response.Status.BAD_REQUEST, String.format("%s %s cannot be admitted:- %s",
ComponentTypeUtils.toString(componentType), functionName, e.getMessage()));
}
Expand Down Expand Up @@ -327,7 +327,7 @@ public void updateFunction(final String tenant,
worker().getFunctionRuntimeManager().getRuntimeFactory().doAdmissionChecks(functionDetails);
} catch (Exception e) {
log.error("Updated {} {}/{}/{} cannot be submitted to runtime factory",
ComponentTypeUtils.toString(componentType), tenant, namespace, functionName);
ComponentTypeUtils.toString(componentType), tenant, namespace, functionName, e);
throw new RestException(Response.Status.BAD_REQUEST, String.format("%s %s cannot be admitted:- %s",
ComponentTypeUtils.toString(componentType), functionName, e.getMessage()));
}
Expand Down

0 comments on commit dc035f5

Please sign in to comment.