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
val fut = (k8s usingNamespace namespace delete[ConfigMap] name).map { r => Right(r) }.recover {
case t: Throwable =>
Left(t)
}
println(Await.result(fut, Duration.Inf))
I can repeatedly execute the above, with no Left(...) ever being returned. The first time, of course, it should succeed, but in subsequent invocations, it should raise an exception.
The corresponding code works fine for create (and other CRUD) operations:
// val fut = (k8s usingNamespace namespace create configMap).map { r => Right(r) }.recover {
// case t: Throwable =>
// Left(t)
// }
Attempting to invoke more than once will return a Left, such as this one:
In the case of delete, if the object doesn't exist, we see:
[INFO] [01/13/2022 15:30:00.738] [default-akka.actor.default-dispatcher-4] [skuber.api] [Response: non-ok status returned - Status(v1,Status,ListMeta(,,None),Some(Failure),Some(configmaps "foo22" not found),Some(NotFound),Some({"name":"foo22","kind":"configmaps"}),Some(404))
Right(())
Clearly, the non-200 status (404) is returned, but skuber doesn't appear to raise an exception.
I'm using:
"io.github.hagay3" %% "skuber" % "2.7.0",
The text was updated successfully, but these errors were encountered:
Thanks much @hagay3. I updated my project with 2.7.4 and am now getting exceptions on non-existent objects upon attempted deletes. I appreciate the fast turnaround.
If I do effectively this:
I can repeatedly execute the above, with no Left(...) ever being returned. The first time, of course, it should succeed, but in subsequent invocations, it should raise an exception.
The corresponding code works fine for create (and other CRUD) operations:
Attempting to invoke more than once will return a Left, such as this one:
In the case of delete, if the object doesn't exist, we see:
Clearly, the non-200 status (404) is returned, but skuber doesn't appear to raise an exception.
I'm using:
"io.github.hagay3" %% "skuber" % "2.7.0",
The text was updated successfully, but these errors were encountered: