cockpit.js: Errors

cockpit.js: Errors — Problem codes and messages

Problem Codes

Cockpit represents problems with standardized problem string codes.


The user is not permitted to perform the action in question.


User authentication failed.


An unexpected internal error without further info. This should not happen during the normal course of operations.


The system does not have a compatible version of Cockpit installed or installed properly.


Cockpit is not logged in.


Something specifically requested was not found, such as a file, executable etc.


Something was terminated forcibly, such as a connection, process session, etc.


Something timed out.


The remote host had an unexpected or unknown key.


Could not forward authentication credentials to the remote host.


message = cockpit.message(problem)
message = cockpit.message(exception)

Return a message for the exception or problem code passed as an argument. If the argument is an object with a "message" property, as is the case with most exceptions, that will be returned directly. If the argument is an object with a "problem" property, then it will be used as the problem code. An appropriate message will be returned for problem codes.