Repository: kubernetes
Issue: Some API parameter parsing error
Labels: kind/bug,sig/api-machinery,wg/api-expression,needs-triage

### What happened?

### /api/v1/componentstatuses/{name}
When I accessed a non-existent component,I recevied 500 status

### resourceVerison parameter parsiong error
When I set the value of the `resourceverion` parameter to an arbitrary string,I got 500 status 




### What did you expect to happen?

### /api/v1/componentstatuses/{name}
I think when I access a non-existent component, I should recevie a 404 status response rather than a 500 status.I found this error in v1.18.3 but in v1.25.3 I still find it.

### resourceVerison parameter parsiong error
In the[ documentation](https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions) , when I  request list or get for a resource version that the API server does not recognize, then the API server may either:

- wait briefly for the resource version to become available, then timeout with a if the provided resource versions does not become available in a reasonable amount of time;**504 (Gateway Timeout)**

- respond with a response header indicating how many seconds a client should wait before retrying the request.**Retry-After**
- If you request a resource version that an API server does not recognize, the kube-apiserver additionally identifies its error responses with a "**Too large resource version**" message
So I think when I set up a wrong value for resourceVersion,I should recevie a 504 status rather than a 500 status

### How can we reproduce it (as minimally and precisely as possible)?


### /api/v1/componentstatuses{name}
curl -v -X GET 'https://1ip:port/api/v1/componentstatuses/galvanize' -H 'Authorization:CENSORED' -H 'Accept: */*'
### resourceVerion error
curl -v -X GET 'https://ip:port/apis/storage.k8s.io/v1/watch/namespaces/wallpaper/csistoragecapacities?pretty=one-armed&resourceVersion=cool&limit=58&allowWatchBookmarks=false' -H 'Authorization:CENSORED' -H 'Accept: */*



### Anything else we need to know?

_No response_

### Kubernetes version

<details>

```console
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"25", GitVersion:"v1.25.3", GitCommit:"434bfd82814af038ad94d62ebe59b133fcb50506", GitTreeState:"clean", BuildDate:"2022-10-12T10:57:26Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/amd64"}

```

</details>


### Cloud provider

<details>
none
</details>


### OS version

<details>

```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
NAME="Ubuntu"
VERSION="20.04.3 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.3 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal




</details>


### Install tools

<details>

</details>


### Container runtime (CRI) and version (if applicable)

<details>

</details>


### Related plugins (CNI, CSI, ...) and versions (if applicable)

<details>

</details>