In the “Error Handling in gRPC” section (page 63 of the print version) it is said that we should use error codes from the codes package to ensure consistency across gRPC implementations. However, when the code for the actual error is shown, a hardcoded code of “404” is used.
The function New
from the status package is called instead of Error
but they both accept a codes.Code
interface as their first argument. Is there any difference or a particular reason why it was hardcoded?