• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

FIWARE / contract-management / #9

21 Sep 2023 09:02AM UTC coverage: 0.196%. First build
#9

Pull #1

pulledtim
api update
Pull Request #1: init

138 of 138 new or added lines in 10 files covered. (100.0%)

29 of 14769 relevant lines covered (0.2%)

0.0 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/java/org/fiware/iam/exception/ConversionErrorExceptionhandler.java
1
package org.fiware.iam.exception;
2

3
import io.micronaut.context.annotation.Primary;
4
import io.micronaut.context.annotation.Requires;
5
import io.micronaut.core.convert.exceptions.ConversionErrorException;
6
import io.micronaut.http.HttpRequest;
7
import io.micronaut.http.HttpResponse;
8
import io.micronaut.http.HttpStatus;
9
import io.micronaut.http.annotation.Produces;
10
import io.micronaut.http.server.exceptions.ExceptionHandler;
11
import jakarta.inject.Singleton;
12
import lombok.extern.slf4j.Slf4j;
13
import org.fiware.iam.tmforum.product.server.model.ErrorVO;
14

15
@Produces
16
@Singleton
17
@Primary
18
@Requires(classes = {ConversionErrorException.class, ExceptionHandler.class})
19
@Slf4j
×
20
public class ConversionErrorExceptionhandler implements ExceptionHandler<ConversionErrorException, HttpResponse<ErrorVO>> {
×
21

22
    @Override
23
    public HttpResponse<ErrorVO> handle(HttpRequest request, ConversionErrorException exception) {
24
        log.warn("Received unexpected exception {} for request {}.", exception.getMessage(), request, exception);
×
25
        return HttpResponse.status(HttpStatus.BAD_REQUEST)
×
26
                .body(new ErrorVO().status(HttpStatus.BAD_REQUEST.toString())
×
27
                        .reason(HttpStatus.BAD_REQUEST.getReason())
×
28
                        .message("Request could not be answered due to faulty input."));
×
29
    }
30
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc