code: public function invalidQueryParameter(string $param, ?string $detail = null, array $failed = []): ErrorInterface
      {
          return new Error(
              null,
              null,
              Response::HTTP_BAD_REQUEST,
              $this->trans('query_invalid', 'code'),
              $this->trans('query_invalid', 'title'),
              $detail ?: $this->trans('query_invalid', 'detail'),
              [Error::SOURCE_PARAMETER => $param],
              $failed ? compact('failed') : null
          );
      }
docs: Create an error for an invalid query parameter.
  
  @param string $param
  @param string|null $detail
  the validation message (already translated).
  @param array $failed
  rule failure details.
  @return ErrorInterface