class HandlingReportServiceImpl implements HandlingReportService {
  private static final Logger logger = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());

  private final ApplicationEvents applicationEvents;

  public HandlingReportServiceImpl(ApplicationEvents applicationEvents) {
    this.applicationEvents = applicationEvents;
  }

  @PostMapping(value = "/handlingReport", produces = APPLICATION_JSON_VALUE, consumes = APPLICATION_JSON_VALUE)
  @Override
  public ResponseEntity<?> submitReport(@Valid @RequestBody HandlingReport handlingReport) {<FILL_FUNCTION_BODY>}
}

    try {
      List<HandlingEventRegistrationAttempt> attempts = parse(handlingReport);
      attempts.forEach(applicationEvents::receivedHandlingEventRegistrationAttempt);
    } catch (Exception e) {
      logger.error("Unexpected error in submitReport", e);
      return ResponseEntity.status(INTERNAL_SERVER_ERROR).body("Internal server error: " + e.getMessage());
    }
    return ResponseEntity.status(CREATED).build();
  
<no_super_class>