In version 1.2.0-beta.1, per-page ETag feature was added. When calling NewListSettingsPagerwith the IfNoneMatch option, if the server responds with a 304 Not Modified, the current behavior of this method is to return a nilETag and an empty settings collection. This behavior is inconsistent with the GetSetting method.
The GetSetting method yet supports passing the OnlyIfChanged option. Its behavior is that if the server responds with a 304, the method will throw a ResponseError with status code 304. This behavior is inconsistent with that of ListSettingsPager.
It's not that I think a 304 should be treated as a ResponseError, but similar responses should at least have consistent behavior across different APIs.
To me, it might be more reasonable not to throw a ResponseError but instead return a nil setting for GetSetting , a nil settings collection for listing page.
In version 1.2.0-beta.1, per-page ETag feature was added. When calling
NewListSettingsPager
with theIfNoneMatch
option, if the server responds with a 304 Not Modified, the current behavior of this method is to return anil
ETag
and an empty settings collection. This behavior is inconsistent with theGetSetting
method.The
GetSetting
method yet supports passing theOnlyIfChanged
option. Its behavior is that if the server responds with a 304, the method will throw a ResponseError with status code 304. This behavior is inconsistent with that ofListSettingsPager
.It's not that I think a 304 should be treated as a ResponseError, but similar responses should at least have consistent behavior across different APIs.
To me, it might be more reasonable not to throw a ResponseError but instead return a
nil
setting forGetSetting
, anil
settings collection for listing page.