Open jonathan-r-thorpe opened 10 months ago
We will do a first attempt to see what a unified mapping table looks like.
Here's a first pass at a mapping table.
From the ConfigurationAPI.raml this is the current mapping from NcMethodStatus to HTTP Code:
NcMethodStatus | MS-05-02 code | HTTP code |
---|---|---|
OK | 200 | 200 |
BadOid | 404 | 404 |
MethodNotImplmented | 501 | 404 |
PropertyNotImplemented | 502 | 404 |
Readonly | 405 | 500 |
ParameterError | 417 | 400 |
DeviceError | 500 | 500 |
However, These NcMethodStatus codes are not covered by the current RAML:
NcMethodStatus | MS-05-02 code | Comment |
---|---|---|
BadCommandFormat | 400 Badly-formed command | IS-12 specific? |
Unauthorized | 401 Client is not authorized | Usage not well defined |
InvalidRequest | 406 Method call is invalid in current operating context | This needs a mapping (4xx?) |
Conflict | 409 There is a conflict with the current state of the device | This needs a mapping (5xx?) |
BufferOverflow | 413 Something was too big | This needs a mapping (5xx?) |
IndexOutOfBounds | 414 Index is outside the available range | This needs a mapping (4xx?) |
Locked | 423 Addressed object is locked | This needs a mapping (?) |
NotReady | 503 The device is not ready to handle any commands | This needs a mapping (5xx?) |
Timeout | 504 Method call did not finish within the allotted time | Distinct from an HTTP timeout? |
https://github.com/AMWA-TV/is-14/blob/publish-CR/docs/API%20requests.md
Currently there are multiple tables describing mappings from NcMethodStatus to HTTP codes. This should be replaced with a single table that maps all NcMethodStatus codes to HTTP codes (similar to the data type marshalling document)