[net](../../index.md) / [com.drake.net](../index.md) / [com.yanzhenjie.kalle.KalleConfig.Builder](index.md) / [onStateError](./on-state-error.md) # onStateError `fun Builder.onStateError(block: `[`Throwable`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html)`.(view: `[`View`](https://developer.android.com/reference/android/view/View.html)`) -> `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html)`): `[`Unit`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html) 该函数指定某些Observer的onError中的默认错误信息处理 如果不设置默认只有 解析数据错误 | 后台自定义错误 会显示吐司 **See Also** [NetConfig.onStateError](../-net-config/on-state-error.md)