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
format!("service {scheme} doesn't support operation {op} with args {args}"),
59
+
format!("The service {scheme} does not support the operation {op} with the arguments {args}. Please verify if the relevant flags have been enabled, or submit an issue if you believe this is incorrect."),
60
60
)
61
61
.with_operation(op)
62
62
}
@@ -102,6 +102,34 @@ impl<A: Access> LayeredAccess for CorrectnessAccessor<A> {
102
102
"version",
103
103
));
104
104
}
105
+
if !capability.read_with_if_match && args.if_match().is_some(){
106
+
returnErr(new_unsupported_error(
107
+
self.info.as_ref(),
108
+
Operation::Read,
109
+
"if_match",
110
+
));
111
+
}
112
+
if !capability.read_with_if_none_match && args.if_none_match().is_some(){
113
+
returnErr(new_unsupported_error(
114
+
self.info.as_ref(),
115
+
Operation::Read,
116
+
"if_none_match",
117
+
));
118
+
}
119
+
if !capability.read_with_if_modified_since && args.if_modified_since().is_some(){
120
+
returnErr(new_unsupported_error(
121
+
self.info.as_ref(),
122
+
Operation::Read,
123
+
"if_modified_since",
124
+
));
125
+
}
126
+
if !capability.read_with_if_unmodified_since && args.if_unmodified_since().is_some(){
127
+
returnErr(new_unsupported_error(
128
+
self.info.as_ref(),
129
+
Operation::Read,
130
+
"if_unmodified_since",
131
+
));
132
+
}
105
133
106
134
self.inner.read(path, args).await
107
135
}
@@ -146,6 +174,34 @@ impl<A: Access> LayeredAccess for CorrectnessAccessor<A> {
146
174
"version",
147
175
));
148
176
}
177
+
if !capability.stat_with_if_match && args.if_match().is_some(){
178
+
returnErr(new_unsupported_error(
179
+
self.info.as_ref(),
180
+
Operation::Stat,
181
+
"if_match",
182
+
));
183
+
}
184
+
if !capability.stat_with_if_none_match && args.if_none_match().is_some(){
185
+
returnErr(new_unsupported_error(
186
+
self.info.as_ref(),
187
+
Operation::Stat,
188
+
"if_none_match",
189
+
));
190
+
}
191
+
if !capability.stat_with_if_modified_since && args.if_modified_since().is_some(){
192
+
returnErr(new_unsupported_error(
193
+
self.info.as_ref(),
194
+
Operation::Stat,
195
+
"if_modified_since",
196
+
));
197
+
}
198
+
if !capability.stat_with_if_unmodified_since && args.if_unmodified_since().is_some(){
199
+
returnErr(new_unsupported_error(
200
+
self.info.as_ref(),
201
+
Operation::Stat,
202
+
"if_unmodified_since",
203
+
));
204
+
}
149
205
150
206
self.inner.stat(path, args).await
151
207
}
@@ -410,7 +466,7 @@ mod tests {
410
466
assert!(res.is_err());
411
467
assert_eq!(
412
468
res.unwrap_err().to_string(),
413
-
"Unsupported (permanent) at write => service memory doesn't support operation write with args if_none_match"
469
+
"Unsupported (permanent) at write => The service memory does not support the operation write with the arguments if_none_match. Please verify if the relevant flags have been enabled, or submit an issue if you believe this is incorrect."
414
470
);
415
471
416
472
// Now try a wildcard if-none-match
@@ -421,8 +477,7 @@ mod tests {
421
477
assert!(res.is_err());
422
478
assert_eq!(
423
479
res.unwrap_err().to_string(),
424
-
"Unsupported (permanent) at write, context: { hint: use if_not_exists instead } => \
425
-
service memory doesn't support operation write with args if_none_match"
480
+
"Unsupported (permanent) at write, context: { hint: use if_not_exists instead } => The service memory does not support the operation write with the arguments if_none_match. Please verify if the relevant flags have been enabled, or submit an issue if you believe this is incorrect."
0 commit comments