Skip to content

Commit 512d230

Browse files
committed
only silently capture JuliaHubErrors in datasets()
1 parent 25c9f8f commit 512d230

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/datasets.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,10 @@ function datasets(
360360
end
361361
return Dataset(dataset)
362362
catch e
363+
# If Dataset() fails due to some unexpected value in one of the dataset JSON objects that
364+
# JuliaHub.jl can not handle, it should only throw a JuliaHubError. So we rethrow on other
365+
# error types, as filtering all of them out could potentially hide JuliaHub.jl bugs.
366+
isa(e, JuliaHubError) || rethrow()
363367
@debug "Invalid dataset in GET /datasets response" dataset exception = (
364368
e, catch_backtrace()
365369
)

0 commit comments

Comments
 (0)