public RuntimeException handleException()

in aws-iotwireless-wirelessdevice/src/main/java/software/amazon/iotwireless/wirelessdevice/BaseHandlerStd.java [70:86]


    public RuntimeException handleException(final Exception error, final IotWirelessRequest request) {
        if (error instanceof ResourceNotFoundException) {
            return new CfnNotFoundException(ResourceModel.TYPE_NAME, extractResourceIdFromRequests(request));
        } if (error instanceof ConflictException) {
            return new ResourceAlreadyExistsException(error);
        } if (error instanceof InternalServerException) {
            return new CfnInternalFailureException(error);
        } if (error instanceof ThrottlingException) {
            return new CfnThrottlingException(ResourceModel.TYPE_NAME, error);
        } if (error instanceof ValidationException) {
            return new CfnInvalidRequestException(ResourceModel.TYPE_NAME, error);
        } if (error instanceof AccessDeniedException) {
            return new CfnAccessDeniedException(ResourceModel.TYPE_NAME, error);
        } else {
            return new CfnGeneralServiceException(ResourceModel.TYPE_NAME, error);
        }
    }