Help : not-supported:Cockpit is not compatible with the software on the system. #19484
Replies: 3 comments
-
This is not a valid way to call cockpit.http({ port: 8080 }).get("/apps/catalog")... Still, this shouldn't cause a |
Beta Was this translation helpful? Give feedback.
-
I am customizing and developing a plugin for Cockpit, using create react app, which runs in React. Now that I have added body: '', it can run normally, but there is still something I don't understand. The interface I call through the request method is an API interface, and I need to handle different logic based on the status codes returned by the API, such as 200, 400, 404, and 500. However, it is how I should obtain the data returned by the API. It seems that I only obtained the data without the status code, But I tried using request. response ((status, headers)=>{...}), and here it seems that the body。
When the returned status code is 400, it is caught by the catch。 @martinpitt |
Beta Was this translation helpful? Give feedback.
-
Right, you'll get the
or alternatively if it's not a HTTP but a connection error:
|
Beta Was this translation helpful? Give feedback.
-
ubuntu 22.04
cockpit 300.1
This is my code for test cockpit.http.request
This is the resust:
Object { problem: "not-supported", message: "Cockpit is not compatible with the software on the system.", toString: toString() }
Beta Was this translation helpful? Give feedback.
All reactions