Looks like these three exceptions duplicate this method. Could we add `class JsonError < StandardError` with this method and inherit from that?