From f8325e64ca82b3dd0e7830d1ef28fde803d57e8c Mon Sep 17 00:00:00 2001 From: rkodev <43806892+rkodev@users.noreply.github.com> Date: Thu, 29 Aug 2024 15:29:51 +0300 Subject: [PATCH 1/2] fix: add accessors for ApiErrorable --- api_error.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api_error.go b/api_error.go index 83f5e17..9fa99b4 100644 --- a/api_error.go +++ b/api_error.go @@ -5,6 +5,8 @@ import "fmt" type ApiErrorable interface { SetResponseHeaders(ResponseHeaders *ResponseHeaders) SetStatusCode(ResponseStatusCode int) + GetResponseHeaders() *ResponseHeaders + GetStatusCode() int } // ApiError is the parent type for errors thrown by the client when receiving failed responses to its requests @@ -34,3 +36,11 @@ func (e *ApiError) SetResponseHeaders(ResponseHeaders *ResponseHeaders) { func (e *ApiError) SetStatusCode(ResponseStatusCode int) { e.ResponseStatusCode = ResponseStatusCode } + +func (e *ApiError) GetResponseHeaders() *ResponseHeaders { + return e.ResponseHeaders +} + +func (e *ApiError) GetStatusCode() int { + return e.ResponseStatusCode +} From bf8ed80ec44be559917da16688c78365789b50b0 Mon Sep 17 00:00:00 2001 From: rkodev <43806892+rkodev@users.noreply.github.com> Date: Thu, 29 Aug 2024 16:01:11 +0300 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57d98cb..fd3c69e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +### Added + +## [1.7.0] - 2024-07-09 + +- Added accessors for headers and status to `ApiErrorable` [#177](https://github.com/microsoft/kiota-abstractions-go/issues/177) + +### Changed + ## [1.6.1] - 2024-07-09 - Corrected two instances of `octet-steam` to `octet-stream` [#173](https://github.com/microsoft/kiota-abstractions-go/pull/173), [#174](https://github.com/microsoft/kiota-abstractions-go/pull/174)