Skip to content

Commit

Permalink
fix: Wrap TicketRouter flightInfoFor and resolve calls with wrapAsFai…
Browse files Browse the repository at this point in the history
…ledExport (#6215)
  • Loading branch information
devinrsmith authored Oct 23, 2024
1 parent a4c2be6 commit 0b7726a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public <T> SessionState.ExportObject<T> resolve(
try (final SafeCloseable ignored = QueryPerformanceRecorder.getInstance().getNugget(
"resolveTicket:" + ticketName)) {
return getResolver(ticket.get(ticket.position()), logId).resolve(session, ticket, logId);
} catch (RuntimeException e) {
return SessionState.wrapAsFailedExport(e);
}
}

Expand Down Expand Up @@ -122,6 +124,8 @@ public <T> SessionState.ExportObject<T> resolve(
try (final SafeCloseable ignored = QueryPerformanceRecorder.getInstance().getNugget(
"resolveDescriptor:" + descriptor)) {
return getResolver(descriptor, logId).resolve(session, descriptor, logId);
} catch (RuntimeException e) {
return SessionState.wrapAsFailedExport(e);
}
}

Expand Down Expand Up @@ -263,6 +267,8 @@ public SessionState.ExportObject<Flight.FlightInfo> flightInfoFor(
try (final SafeCloseable ignored = QueryPerformanceRecorder.getInstance().getNugget(
"flightInfoForDescriptor:" + descriptor)) {
return getResolver(descriptor, logId).flightInfoFor(session, descriptor, logId);
} catch (RuntimeException e) {
return SessionState.wrapAsFailedExport(e);
}
}

Expand Down

0 comments on commit 0b7726a

Please sign in to comment.