Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useless and misleading message in Config.fromKubeconfig #5166

Closed
spwangxp opened this issue May 23, 2023 · 2 comments · Fixed by #5199
Closed

useless and misleading message in Config.fromKubeconfig #5166

spwangxp opened this issue May 23, 2023 · 2 comments · Fixed by #5199
Assignees
Labels
Milestone

Comments

@spwangxp
Copy link

spwangxp commented May 23, 2023

config.getErrorMessages().put(401, "Unauthorized! Token may have expired! Please log-in again.");

config.getErrorMessages().put(401, "Unauthorized! " + txt);

is there any reason to add this message?

@manusa
Copy link
Member

manusa commented May 23, 2023

This goes back to one of the initial commits in the project (#237, #142, #93) #92
Not sure why they were added originally.

It does seem like an outdated solution, we should find a proper way to forward any error messages (real). Also, this looks like it was probably consumed by a downstream project that very likely is no longer active.

@manusa manusa added the bug label May 23, 2023
@shawkins
Copy link
Contributor

Also, this looks like it was probably consumed by a downstream project that very likely is no longer active.

I'd vote for removing what is set in the config and deprecating getErrorMessages. The kubernetes status or what's in HttpStatusMessage should cover the bases well enough.

@rohanKanojia rohanKanojia moved this to Planned in Eclipse JKube May 31, 2023
@rohanKanojia rohanKanojia self-assigned this Jun 1, 2023
@rohanKanojia rohanKanojia moved this from Planned to In Progress in Eclipse JKube Jun 1, 2023
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jun 1, 2023
…'s `errorMessages` and deprecate it (fabric8io#5166)

+ Remove opinionated status code to message mappings from Config
+ Deprecate Config.errorMessages field in favor of kubernetes status
+ Update OperationSupport to only rely on Kubernetes status for error
  messages

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jun 2, 2023
…'s `errorMessages` and deprecate it (fabric8io#5166)

+ Remove opinionated status code to message mappings from Config
+ Deprecate Config.errorMessages field in favor of kubernetes status
+ Update OperationSupport to only rely on Kubernetes status for error
  messages

Signed-off-by: Rohan Kumar <[email protected]>
@rohanKanojia rohanKanojia moved this from In Progress to Review in Eclipse JKube Jun 2, 2023
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jun 13, 2023
…'s `errorMessages` and deprecate it (fabric8io#5166)

+ Remove opinionated status code to message mappings from Config
+ Deprecate Config.errorMessages field in favor of kubernetes status
+ Update OperationSupport to only rely on Kubernetes status for error
  messages

Signed-off-by: Rohan Kumar <[email protected]>
rohanKanojia added a commit to rohanKanojia/kubernetes-client that referenced this issue Jun 13, 2023
…'s `errorMessages` and deprecate it (fabric8io#5166)

+ Remove opinionated status code to message mappings from Config
+ Deprecate Config.errorMessages field in favor of kubernetes status
+ Update OperationSupport to only rely on Kubernetes status for error
  messages

Signed-off-by: Rohan Kumar <[email protected]>
@manusa manusa added this to the 6.8.0 milestone Jun 19, 2023
manusa pushed a commit that referenced this issue Jun 19, 2023
…'s `errorMessages` and deprecate it (#5166)

+ Remove opinionated status code to message mappings from Config
+ Deprecate Config.errorMessages field in favor of kubernetes status
+ Update OperationSupport to only rely on Kubernetes status for error
  messages

Signed-off-by: Rohan Kumar <[email protected]>
@github-project-automation github-project-automation bot moved this from Review to Done in Eclipse JKube Jun 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants