{"record":{"id":"6bb16f81afe82eef","repo":"stalwartlabs/stalwart","slug":"not-implemented","errorCode":null,"errorMessage":"Not Implemented","messagePattern":"Not Implemented","errorType":"http","errorClass":"ScimError","httpStatus":501,"severity":"error","filePath":"crates/scim-proto/src/message/error.rs","lineNumber":199,"sourceCode":"\n    pub fn max_operations_exceeded(max_operations: usize) -> Self {\n        Error::new(413).with_detail(format!(\n            \"The number of operations in the bulk request exceeds the maxOperations ({max_operations}).\"\n        ))\n    }\n\n    pub fn max_payload_size_exceeded(max_payload_size: usize) -> Self {\n        Error::new(413).with_detail(format!(\n            \"The size of the bulk operation exceeds the maxPayloadSize ({max_payload_size}).\"\n        ))\n    }\n\n    pub fn internal_error() -> Self {\n        Error::new(500)\n    }\n\n    pub fn not_implemented() -> Self {\n        Error::new(501)\n    }\n\n    pub fn is_client_error(&self) -> bool {\n        (400..500).contains(&self.status)\n    }\n}\n\nimpl Serialize for Error {\n    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>\n    where\n        S: Serializer,\n    {\n        let mut map = serializer.serialize_map(None)?;\n        map.serialize_entry(\"schemas\", &[MESSAGE_ERROR])?;\n        if let Some(scim_type) = &self.scim_type {\n            map.serialize_entry(\"scimType\", scim_type.as_str())?;\n        }\n        if let Some(detail) = &self.detail {","sourceCodeStart":181,"sourceCodeEnd":217,"githubUrl":"https://github.com/stalwartlabs/stalwart/blob/e96200385781a6a9995a8b839ac27d6c75a983ee/crates/scim-proto/src/message/error.rs#L181-L217","documentation":"A SCIM Error with HTTP status 501 (\"Not Implemented\"), built by `Error::not_implemented()`. The library throws it when the server does not implement the requested SCIM capability — for example bulk operations, PATCH, or a filtering feature that is disabled or absent.","triggerScenarios":"Sending a request for an optional SCIM feature (e.g. POST /Bulk, PATCH /Users/{id}, or an advanced filter) that the server has not implemented, so the handler constructs `Error::not_implemented()`.","commonSituations":"Clients assume RFC 7644 optional features are always available; connecting to a minimal/trimmed SCIM server build; a provider disabled bulk or PATCH support in a newer version.","solutions":["Check /ServiceProviderConfig for the features you need (bulk, filter, patch, etag) before using them.","Fall back to supported operations — e.g. use PUT instead of PATCH, or individual requests instead of Bulk.","Enable or upgrade the server component that implements the missing feature."],"exampleFix":"// before\nclient.patch_user(id, ops).await?;\n// after\nif server_config.patch.supported {\n    client.patch_user(id, ops).await?;\n} else {\n    client.put_user(id, full_resource).await?;\n}","handlingStrategy":"type-guard","validationCode":"let cfg = client.service_provider_config().await?;\nlet patch_supported = cfg.patch.as_ref().map(|p| p.supported).unwrap_or(false);\nlet bulk_supported = cfg.bulk.is_some();","typeGuard":"fn supports_bulk(cfg: &ServiceProviderConfig) -> bool {\n    cfg.bulk.as_ref().map(|b| b.supported).unwrap_or(false)\n}","tryCatchPattern":null,"preventionTips":["Gate optional-feature calls behind /ServiceProviderConfig checks at startup.","Implement fallbacks: PUT instead of PATCH, single requests instead of Bulk.","Re-validate feature support after server upgrades."],"tags":["scim","http-501","unsupported-feature"],"backgroundTag":"method-not-implemented","analyzedSha":"e96200385781a6a9995a8b839ac27d6c75a983ee","analyzedAt":"2026-09-06T22:07:17.982Z","contentChangedAt":"2026-09-06T22:07:17.982Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}