Skip to content

Commit

Permalink
FIX renumbering ORION-PLUGIN traces
Browse files Browse the repository at this point in the history
  • Loading branch information
fgalan authored Jun 12, 2024
1 parent 491f2ab commit a41c81a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions lib/plugins/orionPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function inspectBodyJSON(logger, body, field, callback) {
callback(new errors.WrongJsonPayload());
}
} else {
logger.error('[ORION-PLUGIN-003] Wrong JSON Payload: updateAction element not found');
logger.error('[ORION-PLUGIN-001] Wrong JSON Payload: updateAction element not found');

callback(new errors.WrongJsonPayload());
}
Expand All @@ -103,7 +103,7 @@ function inspectBodyV2(req, res, callback) {

} else {
// TODO: raise error if the type is not recognized.
logger.error('[ORION-PLUGIN-004] Unknown content type: %s', req.headers['content-type']);
logger.error('[ORION-PLUGIN-002] Unknown content type: %s', req.headers['content-type']);

actionHandler(new errors.UnexpectedContentType(req.headers['content-type']));
}
Expand Down Expand Up @@ -147,7 +147,7 @@ function inspectUrl(req, res, callback) {
}
}

logger.error('[ORION-PLUGIN-005] Action not found');
logger.error('[ORION-PLUGIN-003] Action not found');
callback(new errors.ActionNotFound(), req, res);
}

Expand Down
8 changes: 3 additions & 5 deletions operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,11 @@ it is critical: human supervision is highly advisable. Check the Keystone instan
the Keystone Operations Manual.

### Orion errors
#### ORION-PLUGIN-002: Wrong XML Payload. Parsing error: %s
An XML payload with syntactic errors has been received. This should be a client error, and it shouldn't require human intervention. Warn the user if the error repeats.
#### ORION-PLUGIN-003: Wrong JSON Payload: updateAction element not found
#### ORION-PLUGIN-001: Wrong JSON Payload: updateAction element not found
Indicates that a received request didn't have the appropriate information to determine which action it's going to execute, so the validation process can't proceed. This is a client error and should not require human intervention. Warn the user if the error repeats.
#### ORION-PLUGIN-004: Unknown content type: %s
#### ORION-PLUGIN-002: Unknown content type: %s
The proxy received a request with a content type that is not supported. Currently only JSON ('application/json') and XML ('application/xml' and 'text/xml') are supported. This is a client error and should not require human intervention. This may be a problem with the content headers; if repeated, advice the client to check what headers are being sent and the API for the content payload.
#### ORION-PLUGIN-005: Action not found
#### ORION-PLUGIN-003: Action not found
This error is raised when a request action should be identifiable with the information in the URL but the proxy was unavailable to do so. It might happen when the request is trying to access a URL that is not known by the Orion plugin (maybe because the client is trying to access version of the Orion Context Broker different of the one supported by the proxy). This is a client error. The client should check the API he is trying to use is the appropriate one for this version of the proxy and the Context Broker.

## <a name="problems"/> Expected problems and known solutions
Expand Down

0 comments on commit a41c81a

Please sign in to comment.