Class ChaosHandler

java.lang.Object
com.microsoft.kiota.http.middleware.ChaosHandler
All Implemented Interfaces:
okhttp3.Interceptor

public class ChaosHandler extends Object implements 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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The key for the open telemetry event
    static final int
    Too many requests status code

    Fields inherited from interface okhttp3.Interceptor

    Companion
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new instance of the chaos handler
  • Method Summary

    Modifier and Type
    Method
    Description
    okhttp3.Response
    intercept(okhttp3.Interceptor.Chain chain)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • MSClientErrorCodeTooManyRequests

      public static final int MSClientErrorCodeTooManyRequests
      Too many requests status code
      See Also:
    • chaosHandlerTriggeredEventKey

      public static final String 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:
      intercept in interface okhttp3.Interceptor
      Throws:
      IOException