ksef-rb 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/lib/ksef/internal/connection.rb +9 -2
- data/lib/ksef/invoice_header.rb +2 -2
- data/lib/ksef/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7f0036e4b7913536223a5b778902fa2bd69f334494b76772df2cf74dc7a2219d
|
|
4
|
+
data.tar.gz: 3bf943a76ccb8504b13475b7c0783b5571e46191a94e2f999253d5ebe54fa9d1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c99c25e305544ff19f78829e1aa696711b8b19d8439c29f5577b03a4e4e6a0ebe81e225452f094ccc75edb1556234a6654970d5c5136090a4d7fed0986c038f
|
|
7
|
+
data.tar.gz: 642c4bedf0387bc6591b2132f457324b08f413127cba53dca6360d5317b68457fd93622b6fbc6107e0a9f4178ef17e26f16eb066b15aa16a8a45c5eeae9b96f8
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.1.3] - 2026-07-13
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- Retry middleware: `Faraday::RetriableResponse` was missing from
|
|
14
|
+
`Connection::RETRY_OPTIONS[:exceptions]`. Because that key overrides the
|
|
15
|
+
faraday-retry default (which includes it), its absence silently disabled the
|
|
16
|
+
`retry_statuses: [502, 503, 504]` retries **and** leaked the raw synthetic
|
|
17
|
+
`Faraday::RetriableResponse` up the stack instead of mapping it to a typed
|
|
18
|
+
`Ksef::ServerError`. Observed in production as an unretried gateway blip on
|
|
19
|
+
`POST /auth/challenge` surfacing as `Faraday::RetriableResponse` rather than
|
|
20
|
+
being absorbed. The class is now included, so 502/503/504 are retried up to
|
|
21
|
+
`max` and, if still failing, raised as `Ksef::ServerError`. Added regression
|
|
22
|
+
specs covering both retry-then-recover and retry-then-exhaust paths.
|
|
23
|
+
|
|
10
24
|
## [0.1.2] - 2026-05-19
|
|
11
25
|
|
|
12
26
|
### Fixed
|
|
@@ -18,10 +18,17 @@ module Ksef
|
|
|
18
18
|
backoff_factor: 2,
|
|
19
19
|
retry_statuses: [502, 503, 504],
|
|
20
20
|
methods: %i[get head post delete put patch],
|
|
21
|
+
# `Faraday::RetriableResponse` MUST stay in this list: faraday-retry
|
|
22
|
+
# raises it internally to trigger a `retry_statuses` retry. Because we
|
|
23
|
+
# override `exceptions` (rather than inheriting the middleware default,
|
|
24
|
+
# which includes it), omitting it silently disables 502/503/504 retries
|
|
25
|
+
# *and* leaks the raw synthetic exception past `check!` instead of
|
|
26
|
+
# mapping it to a typed `Ksef::ServerError`.
|
|
21
27
|
exceptions: [
|
|
22
28
|
Errno::ETIMEDOUT,
|
|
23
29
|
Faraday::TimeoutError,
|
|
24
|
-
Faraday::ConnectionFailed
|
|
30
|
+
Faraday::ConnectionFailed,
|
|
31
|
+
Faraday::RetriableResponse
|
|
25
32
|
]
|
|
26
33
|
}.freeze
|
|
27
34
|
|
|
@@ -134,7 +141,7 @@ module Ksef
|
|
|
134
141
|
end
|
|
135
142
|
|
|
136
143
|
def parse_retry_after(value)
|
|
137
|
-
return
|
|
144
|
+
return if value.nil?
|
|
138
145
|
|
|
139
146
|
Integer(value)
|
|
140
147
|
rescue ArgumentError, TypeError
|
data/lib/ksef/invoice_header.rb
CHANGED
|
@@ -57,7 +57,7 @@ module Ksef
|
|
|
57
57
|
private
|
|
58
58
|
|
|
59
59
|
def parse_date(value)
|
|
60
|
-
return
|
|
60
|
+
return if value.nil? || value.empty?
|
|
61
61
|
|
|
62
62
|
Date.iso8601(value)
|
|
63
63
|
rescue ArgumentError
|
|
@@ -65,7 +65,7 @@ module Ksef
|
|
|
65
65
|
end
|
|
66
66
|
|
|
67
67
|
def parse_time(value)
|
|
68
|
-
return
|
|
68
|
+
return if value.nil? || value.empty?
|
|
69
69
|
|
|
70
70
|
Time.iso8601(value)
|
|
71
71
|
rescue ArgumentError
|
data/lib/ksef/version.rb
CHANGED