Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,13 @@ public ApiResponse<Void> resolveException(@PathVariable Long exceptionId,
HttpServletRequest httpRequest) {
AdminAuthSupport.requireAuth(httpRequest);
DispatchExceptionRecordEntity exception = dispatchExceptionService.getException(exceptionId);
if ("RESOLVED".equals(exception.getExceptionStatus())) {
if (exception != null && "RESOLVED".equals(exception.getExceptionStatus())) {
throw new BusinessException("DISPATCH_EXCEPTION_ALREADY_RESOLVED", "Dispatch exception already resolved");
}
if ("REASSIGN".equals(request.getAction())) {
if (exception == null) {
throw new BusinessException("DISPATCH_EXCEPTION_NOT_FOUND", "Dispatch exception not found");
}
if (request.getVehicleId() == null) {
throw new BusinessException("DISPATCH_EXCEPTION_VEHICLE_REQUIRED", "Reassign action requires vehicleId");
}
Expand Down
Loading