retrofit-mock / retrofit2.mock / NetworkBehavior / calculateIsError

calculateIsError

fun calculateIsError(): Boolean

Randomly determine whether this call should result in an HTTP error in accordance with configured behavior. When true, #createErrorResponse() should be returned.