You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I suspect this may be a holdover from pre-bucket-type days. Currently, if an object isn't found, the return value is {error, {notfound, <type>}}, whereas for normal K/V operations it's {error, notfound}.
Since fetch_type doesn't take a type for each request, and since each bucket type can only work with one data type, returning the type as part of the error code seems unnecessary (and means client code needs to watch for two different patterns).
The text was updated successfully, but these errors were encountered:
On the other hand, this would require the developer to fetch bucket properties, or know ahead of time and supply the expected type to modify_type. This was more about preventing unintentional errors and enabling the modify_type use-case. Honestly, if you're using datatypes this seems a minor inconvenience to match a slightly different pattern, given you're not working with riak objects anymore. Yes it's inconsistent, but it's a different API.
I suspect this may be a holdover from pre-bucket-type days. Currently, if an object isn't found, the return value is
{error, {notfound, <type>}}
, whereas for normal K/V operations it's{error, notfound}
.Since
fetch_type
doesn't take a type for each request, and since each bucket type can only work with one data type, returning the type as part of the error code seems unnecessary (and means client code needs to watch for two different patterns).The text was updated successfully, but these errors were encountered: