File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/main/java/org/hibernate/infra/sync/jira/service/jira Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1212import org .hibernate .infra .sync .jira .service .jira .model .rest .JiraIssueBulkResponse ;
1313import org .hibernate .infra .sync .jira .service .jira .model .rest .JiraIssues ;
1414
15+ import io .quarkus .logging .Log ;
16+
1517public final class HandlerProjectContext {
1618
1719 // JIRA REST API creates upto 50 issues at a time:
@@ -99,6 +101,7 @@ private Long getCurrentLatestJiraIssueKeyNumber() {
99101 return JiraIssue .keyToLong (issues .issues .get (0 ).key );
100102 }
101103 } catch (Exception e ) {
104+ Log .warn ("Couldn't get the latest Jira issue key number" , e );
102105 return -1L ;
103106 }
104107 }
Original file line number Diff line number Diff line change 11package org .hibernate .infra .sync .jira .service .jira .client ;
22
3+ import java .net .URI ;
34import java .util .List ;
45
56import org .hibernate .infra .sync .jira .service .jira .model .rest .JiraComment ;
@@ -146,10 +147,12 @@ static ObjectMapper objectMapper(ObjectMapper defaultObjectMapper) {
146147 }
147148
148149 @ ClientExceptionMapper
149- static RuntimeException toException (Response response ) {
150+ static RuntimeException toException (URI uri , Response response ) {
150151 if (response .getStatusInfo ().getFamily () == Response .Status .Family .CLIENT_ERROR
151152 || response .getStatusInfo ().getFamily () == Response .Status .Family .SERVER_ERROR ) {
152- return new JiraRestException ("Encountered an error calling Jira REST API. See server logs for details" ,
153+ return new JiraRestException (
154+ "Encountered an error calling Jira REST API: %s resulting in: %s" .formatted (uri ,
155+ response .hasEntity () ? response .readEntity (String .class ) : "No response body" ),
153156 response .getStatus ());
154157 }
155158 return null ;
You can’t perform that action at this time.
0 commit comments