Skip to content

Monolithic blob upload swallows chunk upload errors #12

@coryodaniel

Description

@coryodaniel

In lib/oci/plug/handler.ex (monolithic POST dispatch), the result of Registry.upload_blob_chunk is pattern matched but errors are silently ignored — the code falls through to complete_blob_upload regardless.

case Registry.upload_blob_chunk(...) do
  {:ok, _, _} -> :ok
  err -> err  # this result is discarded
end

case Registry.complete_blob_upload(...) do
  ...
end

The err return from the first case is never used — execution always continues to complete_blob_upload. If the chunk upload fails, the complete will likely also fail, but with a misleading error.

Should propagate the error and return an appropriate HTTP response instead of continuing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions