All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.nadel.instrumentation.parameters.NadelInstrumentationOnErrorParameters.kt Maven / Gradle / Ivy

Go to download

Nadel is a Java library that combines multiple GrahpQL services together into one API.

There is a newer version: 2024-11-20T03-31-21-302962b7
Show newest version
package graphql.nadel.instrumentation.parameters

import graphql.execution.instrumentation.InstrumentationState

data class NadelInstrumentationOnErrorParameters(
    val message: String,
    val exception: Throwable,
    val errorType: ErrorType,
    val errorData: ErrorData,
    private val instrumentationState: InstrumentationState?,
) {
    fun  getInstrumentationState(): T? {
        @Suppress("UNCHECKED_CAST") // trust the caller
        return instrumentationState as T?
    }
}

sealed interface ErrorData {
    data class ServiceExecutionErrorData(
        val executionId: String,
        val serviceName: String,
    ) : ErrorData
}

enum class ErrorType {
    ServiceExecutionError
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy