Skip to content

Commit 52ad329

Browse files
committed
Self-review
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
1 parent 05d269a commit 52ad329

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

impl/http/src/main/java/io/serverlessworkflow/impl/executors/http/auth/JaxRSAccessTokenProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ private Response postManagementRequest(
188188
private Invocation.Builder commonHeaders(
189189
WebTarget target, WorkflowContext workflow, TaskContext task, WorkflowModel model) {
190190
Invocation.Builder builder = target.request(MediaType.APPLICATION_JSON);
191+
builder.header("User-Agent", "OAuth2-Client-Credentials/1.0");
191192
builder.header("Accept", MediaType.APPLICATION_JSON);
192193
builder.header("Cache-Control", "no-cache");
193194
for (var entry : requestInfo.headers().entrySet()) {
@@ -242,8 +243,7 @@ private <T> T execute(TaskContext task, Supplier<T> call) {
242243
e);
243244
} catch (ProcessingException e) {
244245
throw new WorkflowException(
245-
WorkflowError.communication(
246-
-1, task, "Failed to connect or process request: " + e.getMessage())
246+
WorkflowError.communication(task, "Failed to connect or process request: " + e.getMessage())
247247
.build(),
248248
e);
249249
}

0 commit comments

Comments
 (0)