che-server returns 500 when OpenShift token expires in nativeUserMode #20304
Closed
Labels
area/che-server
kind/bug
Outline of a bug - must adhere to the bug report template.
severity/P1
Has a major impact to usage or development of the system.
Describe the bug
In nativeUserMode, when OpenShift token expires, che-server returns 500 on all requests with expired token. Dashboard can't properly react to that. Che-server should return 401.
Issue in code is in OpenshiftTokenInitializationFilter at https://github.com/eclipse-che/che-server/blob/main/infrastructures/openshift/src/main/java/org/eclipse/che/workspace/infrastructure/openshift/multiuser/oauth/OpenshiftTokenInitializationFilter.java#L87 where we throw
RuntimeException
, which is evaluated as code 500 in response. Few lines above we detect 401 response from Kubernetes API, but only to log.Che version
7.34@latest
Steps to reproduce
oc edit oauth cluster
and setExpected behavior
Che-server should return 401, same as kubernetes API.
Runtime
OpenShift
Screenshots
No response
Installation method
chectl/next
Environment
other (please specify in additional context)
Eclipse Che Logs
Additional context
#20275
The text was updated successfully, but these errors were encountered: