Skip to content

Commit 3428499

Browse files
authored
Merge pull request #24 from microsoft/feature/mapping-deduplication
- adds support to deduplicate mapping in the request adapter
2 parents f4578f8 + c8996dc commit 3428499

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
## [0.13.0] - 2024-02-05
15+
16+
### Changed
17+
18+
- Added support for error mapping deduplication to reduce generated code. [#20](https://github.com/microsoft/kiota-http-ruby/issues/20)
19+
1420
## [0.12.0] - 2023-03-28
1521

1622
### Changed

lib/microsoft_kiota_faraday/faraday_request_adapter.rb

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def throw_if_failed_reponse(response, errors_mapping)
8383
error_factory = errors_mapping[status_code] unless errors_mapping.nil?
8484
error_factory = errors_mapping['4XX'] unless !error_factory.nil? || errors_mapping.nil? || status_code > 500
8585
error_factory = errors_mapping['5XX'] unless !error_factory.nil? || errors_mapping.nil? || status_code < 500 || status_code > 600
86+
error_factory = errors_mapping['XXX'] unless !error_factory.nil? || errors_mapping.nil? || status_code < 400 || status_code > 600
8687
raise MicrosoftKiotaAbstractions::ApiError, 'The server returned an unexpected status code and no error factory is registered for this code:' + status_code.to_s if error_factory.nil?
8788
root_node = self.get_root_parse_node(response)
8889
error = root_node.get_object_value(error_factory) unless root_node.nil?
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module MicrosoftKiotaFaraday
4-
VERSION = '0.12.0'
4+
VERSION = '0.13.0'
55
end

0 commit comments

Comments
 (0)