I recently received the following back from the Confluence Cloud REST API from the Content endpoint, which I hadn’t seen before:
{“statusCode”:500,“message”:“org.springframework.transaction.UnexpectedRollbackException: Transaction rolled back because it has been marked as rollback-only”}
However, the documented responses are only 200, 401, and 404. Based on the message, it looks like the error came from deeper within Confluence rather than the API itself. Anyway, I would like to be able to handle this kind of edge case better but it’s hard to test my code against them.
So is there a way to simulate error response codes?