in aws-iotcoredeviceadvisor-suitedefinition/src/main/kotlin/software/amazon/iotcoredeviceadvisor/suitedefinition/ExceptionHandler.kt [22:30]
fun handleDeviceAdvisorException(e: Exception): ProgressEvent<ResourceModel, CallbackContext?> {
throw when (e) {
is ConflictException -> CfnAlreadyExistsException(e)
is ValidationException -> CfnInvalidRequestException(e)
is ResourceNotFoundException -> CfnResourceNotFoundException(e)
is InternalServerException -> CfnServiceInternalErrorException(e)
else -> e
}
}