public async Task ThrowServerSideExceptionResponse() { ThrowServerSideExceptionResponse ThrowServerSideExceptionResponse = await GetJsonAsync <ThrowServerSideExceptionResponse>(ThrowServerSideExceptionRequest.GetRoute()); ValidateThrowServerSideExceptionResponse(ThrowServerSideExceptionResponse); }
/// <summary> /// Intentionally throw so we can test exception handling. /// </summary> /// <param name="aThrowServerSideExceptionAction"></param> /// <param name="aCancellationToken"></param> /// <returns></returns> public override async Task <Unit> Handle ( ThrowServerSideExceptionAction aThrowServerSideExceptionAction, CancellationToken aCancellationToken ) { var throwServerSideExceptionRequest = new ThrowServerSideExceptionRequest(); ThrowServerSideExceptionResponse throwServerSideExceptionResponse = await HttpClient.GetFromJsonAsync <ThrowServerSideExceptionResponse>(throwServerSideExceptionRequest.GetRoute()); return(Unit.Value); }