bufbuild / buf

The best way of working with Protocol Buffers.
https://buf.build
Apache License 2.0
8.93k stars 267 forks source link

Wrap commit not found error to display module:commit not found on push #3100

Closed oliversun9 closed 1 month ago

oliversun9 commented 3 months ago

In buf push, only the dependency commit IDs (not the dependency module names) are included in UploadRequest. This means if one of the dependency commit IDs is not found, the server can only return an error saying this ID is not found, instead of module:ID not found.

This PR converts ID-not-found errors to module:ID-not-found errors.

Before:

Failure: a dependency was not found: shake256/buf.build:2f6ada1cf40c462793a1bc9094e68b66

After:

Failure: dependency buf.build/foo/bar:2f6ada1cf40c462793a1bc9094e68b66 does not exist