The following table "decodes" the SOF0 frame header of the image1. As you have pointed out, the sampling factors for each component are:
The comment in the source code states that:
We also assume that the two chroma components have the same subsampling ratio2.
Since v(Cb): 1 is not the same as v(Cr): 2, it returns the error luma/chroma subsampling ratio.
jpeg.DecodeConfig just returns image.Config of an image. I think it should not care about whether the image is supported by jpeg.Decode. I will send a CL to change the behavior. The CL will focus on (*decoder).processSOF, so it just makes jpeg.DecodeConfig work with more but not all valid images.