|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Helper class for generating RFC 9457 compliant error responses. More...
#include <mitkErrorResponse.h>
Public Types | |
| using | Json = nlohmann::json |
Static Public Member Functions | |
| static Json | Create (const std::string &code, const std::string &title, const std::string &detail, int status, const std::string &instance="") |
| Create an RFC 9457 error response. More... | |
| static Json | NodeNotFound (const std::string &uid, const std::string &instance="") |
| Create a "Node not found" error response. More... | |
| static Json | PropertyNotFound (const std::string &propertyKey, const std::string &nodeUid, const std::string &instance="") |
| Create a "Property not found" error response. More... | |
| static Json | DataStorageNotAvailable (const std::string &instance="") |
| Create a "DataStorage not available" error response. More... | |
| static Json | InvalidRequest (const std::string &detail, const std::string &instance="") |
| Create an "Invalid request" error response. More... | |
| static Json | InternalError (const std::string &detail, const std::string &instance="") |
| Create an "Internal error" response. More... | |
| static Json | PropertyProtected (const std::string &propertyKey, const std::string &instance="") |
| Create a "Property protected" error response. More... | |
| static Json | NodeHasChildren (int childrenCount, const std::string &instance="") |
| Create a "Node has children" error response. More... | |
| static Json | NoData (const std::string &nodeUid, const std::string &instance="") |
| Create a "No data" error response. More... | |
| static Json | NoGeometry (const std::string &nodeUid, const std::string &instance="") |
| Create a "No geometry" error response. More... | |
| static Json | RenderingError (const std::string &detail, const std::string &instance="") |
| Create a "Rendering error" error response. More... | |
| static Json | CircularHierarchyReference (const std::string &instance="") |
| Create a "Circular hierarchy reference" error response. More... | |
| static Json | UnsupportedFormat (const std::string &detail, const std::string &instance="") |
| Create an "Unsupported format" error response. More... | |
| static Json | SerializationError (const std::string &detail, const std::string &instance="") |
| Create a "Serialization error" error response. More... | |
| static Json | FileNotFound (const std::string &filePath, const std::string &instance="") |
| Create a "File not found" error response. More... | |
| static Json | FileReadError (const std::string &filePath, const std::string &detail, const std::string &instance="") |
| Create a "File read error" error response. More... | |
| static Json | TransferModeNotAvailable (const std::string &requestedMode, const std::vector< std::string > &availableModes, const std::string &instance="") |
| Create a "Transfer mode not available" error response. More... | |
| static Json | AccessDenied (const std::string &detail, const std::string &instance="") |
| Create an "Access denied" error response. More... | |
| static Json | Unauthorized (const std::string &detail, const std::string &instance="") |
| Create an "Unauthorized" error response. More... | |
| static Json | RateLimitExceeded (int retryAfterSeconds, const std::string &instance="") |
| Create a "Rate limit exceeded" error response. More... | |
| static Json | FileAccessDenied (const std::string &detail, const std::string &instance="") |
| Create a "File access denied" error response. More... | |
| static Json | RenderWindowNotAvailable (const std::string &instance="") |
| Create a "Render window not available" error response. More... | |
| static Json | TimeNavigationNotAvailable (const std::string &instance="") |
| Create a "Time navigation not available" error response. More... | |
| static Json | TimeStepperNotAvailable (const std::string &instance="") |
| Create a "Time stepper not available" error response. More... | |
| static Json | EditorNotActive (const std::string &detail, const std::string &instance="") |
| Create an "Editor not active" error response. More... | |
| static Json | RenderWindowNotFound (const std::string &windowId, const std::string &instance="") |
| Create a "Render window not found" error response. More... | |
| static Json | UnsupportedOperation (const std::string &detail, const std::string &instance="") |
| Create an "Unsupported operation" error response. More... | |
| static Json | RendererUnavailable (const std::string &windowId, const std::string &instance="") |
| Create a "Renderer unavailable" error response. More... | |
Static Public Attributes | |
| static constexpr const char * | CODE_INVALID_REQUEST |
| static constexpr const char * | CODE_NODE_NOT_FOUND |
| static constexpr const char * | CODE_PROPERTY_NOT_FOUND |
| static constexpr const char * | CODE_DATASTORAGE_NOT_AVAILABLE |
| static constexpr const char * | CODE_INTERNAL_ERROR |
| static constexpr const char * | CODE_PROPERTY_PROTECTED |
| static constexpr const char * | CODE_NODE_HAS_CHILDREN |
| static constexpr const char * | CODE_NO_DATA |
| static constexpr const char * | CODE_NO_GEOMETRY |
| static constexpr const char * | CODE_RENDERING_ERROR |
| static constexpr const char * | CODE_CIRCULAR_HIERARCHY_REFERENCE |
| static constexpr const char * | CODE_UNSUPPORTED_FORMAT |
| static constexpr const char * | CODE_SERIALIZATION_ERROR |
| static constexpr const char * | CODE_FILE_NOT_FOUND |
| static constexpr const char * | CODE_FILE_READ_ERROR |
| static constexpr const char * | CODE_TRANSFER_MODE_NOT_AVAILABLE |
| static constexpr const char * | CODE_ACCESS_DENIED |
| static constexpr const char * | CODE_UNAUTHORIZED |
| static constexpr const char * | CODE_RATE_LIMIT_EXCEEDED |
| static constexpr const char * | CODE_FILE_ACCESS_DENIED |
| static constexpr const char * | CODE_RENDER_WINDOW_NOT_AVAILABLE |
| static constexpr const char * | CODE_TIME_NAVIGATION_NOT_AVAILABLE |
| static constexpr const char * | CODE_TIME_STEPPER_NOT_AVAILABLE |
| static constexpr const char * | CODE_EDITOR_NOT_ACTIVE |
| static constexpr const char * | CODE_RENDER_WINDOW_NOT_FOUND |
| static constexpr const char * | CODE_UNSUPPORTED_OPERATION |
| static constexpr const char * | CODE_RENDERER_UNAVAILABLE |
Helper class for generating RFC 9457 compliant error responses.
RFC 9457 defines a standard format for HTTP API error responses. This class provides factory methods for common error types.
Definition at line 30 of file mitkErrorResponse.h.
Definition at line 33 of file mitkErrorResponse.h.
|
static |
Create an "Access denied" error response.
Used when client IP is not allowed to access the server.
| detail | Description of why access was denied |
| instance | Request path |
|
static |
Create a "Circular hierarchy reference" error response.
| instance | Request path |
|
static |
Create an RFC 9457 error response.
| code | Error code (e.g., "NODE_NOT_FOUND") |
| title | Human-readable title |
| detail | Detailed error message |
| status | HTTP status code |
| instance | Request path that caused the error |
|
static |
Create a "DataStorage not available" error response.
| instance | Request path |
|
static |
Create an "Editor not active" error response.
Used when the targeted editor instance (e.g. StdMultiWidgetEditor) is not currently open in the workbench, even though the render window bridge callback is installed. Distinct from RENDER_WINDOW_NOT_AVAILABLE, which signals that no callback is registered at all (headless / plugin not loaded).
| detail | Optional description (e.g. which editor is missing) |
| instance | Request path |
|
static |
Create a "File access denied" error response.
Used when a file path is outside the allowed directories.
| detail | Description of the restriction |
| instance | Request path |
|
static |
Create a "File not found" error response.
| filePath | The file path that was not found |
| instance | Request path |
|
static |
Create a "File read error" error response.
| filePath | The file path that could not be read |
| detail | Description of the read error |
| instance | Request path |
|
static |
Create an "Internal error" response.
| detail | Description of the error |
| instance | Request path |
|
static |
Create an "Invalid request" error response.
| detail | Description of what was invalid |
| instance | Request path |
|
static |
Create a "No data" error response.
| nodeUid | The node UID that has no data |
| instance | Request path |
|
static |
Create a "Node has children" error response.
| childrenCount | The number of children |
| instance | Request path |
|
static |
Create a "Node not found" error response.
| uid | The UID that was not found |
| instance | Request path |
|
static |
Create a "No geometry" error response.
| nodeUid | The node UID whose data has no usable time geometry |
| instance | Request path |
|
static |
Create a "Property not found" error response.
| propertyKey | The property key that was not found |
| nodeUid | The node UID |
| instance | Request path |
|
static |
Create a "Property protected" error response.
| propertyKey | The protected property key |
| instance | Request path |
|
static |
Create a "Rate limit exceeded" error response.
| retryAfterSeconds | Seconds until the client can retry |
| instance | Request path |
|
static |
Create a "Renderer unavailable" error response.
Used when a window exists but its renderer is currently null, indicating a server-side state inconsistency rather than a missing window.
| windowId | The window id whose renderer is unavailable |
| instance | Request path |
|
static |
Create a "Rendering error" error response.
| detail | Description of the rendering failure |
| instance | Request path |
|
static |
Create a "Render window not available" error response.
Used when the screenshot provider is not connected (headless mode or Qt plugin not loaded).
| instance | Request path |
|
static |
Create a "Render window not found" error response.
Used when a per-window URL segment does not name a known render window of the targeted editor.
| windowId | The window id from the URL |
| instance | Request path |
|
static |
Create a "Serialization error" error response.
| detail | Description of the serialization failure |
| instance | Request path |
|
static |
Create a "Time navigation not available" error response.
Used when the TimeNavigationController is null (e.g. no rendering manager active).
| instance | Request path |
|
static |
Create a "Time stepper not available" error response.
Used when the TimeNavigationController's stepper is null.
| instance | Request path |
|
static |
Create a "Transfer mode not available" error response.
| requestedMode | The requested transfer mode that is not supported |
| availableModes | List of available transfer modes |
| instance | Request path |
|
static |
Create an "Unauthorized" error response.
Used when authentication is required but not provided or invalid.
| detail | Description of the authentication failure |
| instance | Request path |
|
static |
Create an "Unsupported format" error response.
| detail | Description of the format issue |
| instance | Request path |
|
static |
Create an "Unsupported operation" error response.
Used when a sub-resource does not apply to the addressed window (e.g. selected-slice on the 3d window).
| detail | Description of the unsupported operation |
| instance | Request path |
|
staticconstexpr |
Definition at line 52 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 46 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 39 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 59 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 55 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 49 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 50 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 40 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 36 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 43 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 44 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 42 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 37 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 38 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 41 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 54 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 56 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 60 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 62 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 45 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 48 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 57 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 58 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 51 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 53 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 47 of file mitkErrorResponse.h.
|
staticconstexpr |
Definition at line 61 of file mitkErrorResponse.h.