Class ChaosHandler
java.lang.Object
com.microsoft.kiota.http.middleware.ChaosHandler
- All Implemented Interfaces:
okhttp3.Interceptor
DO NOT USE IN PRODUCTION
interceptor that randomly fails the responses for unit testing purposes
-
Nested Class Summary
Nested classes/interfaces inherited from interface okhttp3.Interceptor
okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe key for the open telemetry eventstatic final intToo many requests status codeFields inherited from interface okhttp3.Interceptor
Companion -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
MSClientErrorCodeTooManyRequests
public static final int MSClientErrorCodeTooManyRequestsToo many requests status code- See Also:
-
chaosHandlerTriggeredEventKey
The key for the open telemetry event- See Also:
-
-
Constructor Details
-
ChaosHandler
public ChaosHandler()Creates a new instance of the chaos handler
-
-
Method Details
-
intercept
@Nonnull public okhttp3.Response intercept(@Nonnull okhttp3.Interceptor.Chain chain) throws IOException - Specified by:
interceptin interfaceokhttp3.Interceptor- Throws:
IOException
-