Skip to content

Commit

Permalink
Adds response headers to API exception
Browse files Browse the repository at this point in the history
  • Loading branch information
andrueastman committed Apr 5, 2023
1 parent ce5fed1 commit 0439860
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

## [1.1.1] - 2023-04-06

### Added

- Adds the Response Headers to the ApiException class

## [1.1.0] - 2023-03-22

### Added
Expand Down
7 changes: 7 additions & 0 deletions src/ApiException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
using System;
using System.Collections.Generic;

namespace Microsoft.Kiota.Abstractions;

Expand All @@ -23,8 +24,14 @@ public ApiException(string message) : base(message)
public ApiException(string message, Exception innerException) : base(message, innerException)
{
}

/// <summary>
/// The HTTP response status code.
/// </summary>
public int ResponseStatusCode { get; set; }

/// <summary>
/// The HTTP response headers.
/// </summary>
public IDictionary<string, IEnumerable<string>> ResponseHeaders { get; set; } = new Dictionary<string, IEnumerable<string>>();
}
2 changes: 1 addition & 1 deletion src/Microsoft.Kiota.Abstractions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<PackageProjectUrl>https://microsoft.github.io/kiota/</PackageProjectUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<Deterministic>true</Deterministic>
<VersionPrefix>1.1.0</VersionPrefix>
<VersionPrefix>1.1.1</VersionPrefix>
<VersionSuffix></VersionSuffix>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SignAssembly>false</SignAssembly>
Expand Down

0 comments on commit 0439860

Please sign in to comment.