{"record":{"id":"4b61508aa5c064d9","repo":"apache/pulsar","slug":"partitionexception-get-getmessage","errorCode":null,"errorMessage":"partitionException.get().getMessage()","messagePattern":"partitionException\\.get\\(\\)\\.getMessage\\(\\)","errorType":"http","errorClass":"RestException","httpStatus":412,"severity":"error","filePath":"pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java","lineNumber":2308,"sourceCode":"                                    .attr(\"topicNamePartition\", topicNamePartition)\n                                    .attr(\"subscription\", subName)\n                                    .attr(\"time\", timestamp)\n                                    .exception(e)\n                                    .log(\"Failed to reset cursor on subscription to time\");\n                            future.completeExceptionally(e);\n                        }\n                    }\n\n                    return future.whenComplete((r, ex) -> {\n                        // report an error to user if unable to reset for all partitions\n                        if (failureCount.get() == numPartitions) {\n                            log.warn()\n                                    .attr(\"topic\", topicName)\n                                    .attr(\"subscription\", subName)\n                                    .attr(\"time\", timestamp)\n                                    .attr(\"get\", partitionException.get())\n                                    .log(\"Failed to reset cursor on subscription to time\");\n                            throw new RestException(Status.PRECONDITION_FAILED, partitionException.get().getMessage());\n                        } else if (failureCount.get() > 0) {\n                            log.warn()\n                                    .attr(\"topic\", topicName)\n                                    .attr(\"subscription\", subName)\n                                    .attr(\"time\", timestamp)\n                                    .attr(\"get\", partitionException.get())\n                                    .log(\"Partial errors for reset cursor on subscription to time\");\n                        }\n                    });\n                } else {\n                    return internalResetCursorForNonPartitionedTopic(subName, timestamp, authoritative);\n                }\n            });\n    }\n\n    private CompletableFuture<Void> internalResetCursorForNonPartitionedTopic(String subName, long timestamp,\n                                       boolean authoritative) {\n        return validateTopicOwnershipAsync(topicName, authoritative)","sourceCodeStart":2290,"sourceCodeEnd":2326,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java#L2290-L2326","documentation":"After resetting a subscription cursor to a timestamp across all partitions, at least one partition failed to reset; the aggregated failure cause is propagated to the caller as the partitionException message.","triggerScenarios":"Thrown at pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java:2308 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the inner exception for the failing partition and retry that partition's reset","Verify each partition exists and its ledger is readable"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}