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
  • Loading branch information
devinrsmith committed Oct 18, 2024
1 parent 8e79f7a commit 5250fd6
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 5250fd6

Please sign in to comment.