26#include "iceberg/catalog/rest/iceberg_rest_export.h"
28#include "iceberg/result.h"
33namespace iceberg::rest {
53 const std::string& text)
const = 0;
60 static const std::shared_ptr<DefaultErrorHandler>& Instance();
63 Result<ErrorResponse> ParseResponse(uint32_t code,
64 const std::string& text)
const override;
74 static const std::shared_ptr<NamespaceErrorHandler>& Instance();
86 static const std::shared_ptr<DropNamespaceErrorHandler>& Instance();
98 static const std::shared_ptr<ConfigErrorHandler>& Instance();
110 static const std::shared_ptr<TableErrorHandler>& Instance();
122 static const std::shared_ptr<TableCommitErrorHandler>& Instance();
134 static const std::shared_ptr<CreateTableErrorHandler>& Instance();
146 static const std::shared_ptr<ViewErrorHandler>& Instance();
158 static const std::shared_ptr<ViewCommitErrorHandler>& Instance();
169 static const std::shared_ptr<PlanErrorHandler>& Instance();
180 static const std::shared_ptr<PlanTaskErrorHandler>& Instance();
191 static const std::shared_ptr<OAuthErrorHandler>& Instance();
194 Result<ErrorResponse> ParseResponse(uint32_t code,
195 const std::string& text)
const override;
Error handler for the catalog config endpoint.
Definition error_handlers.h:95
Table create commit operation error handler.
Definition error_handlers.h:131
Default error handler for REST API responses.
Definition error_handlers.h:57
Error handler for drop namespace operations.
Definition error_handlers.h:83
Error handler interface for processing REST API error responses. Maps HTTP status codes to appropriat...
Definition error_handlers.h:37
virtual Status Accept(const ErrorResponse &error) const =0
Process an error response and return an appropriate Error.
virtual Result< ErrorResponse > ParseResponse(uint32_t code, const std::string &text) const =0
Parse an HTTP error response body.
Namespace-specific error handler for create/read/update operations.
Definition error_handlers.h:71
OAuth token endpoint error handler.
Definition error_handlers.h:189
Plan operation error handler.
Definition error_handlers.h:167
Fetch scan tasks operation error handler.
Definition error_handlers.h:178
Table commit operation error handler.
Definition error_handlers.h:119
Table-level error handler.
Definition error_handlers.h:107
View commit operation error handler.
Definition error_handlers.h:155
View-level error handler.
Definition error_handlers.h:143
JSON error payload returned in a response with further details on the error.
Definition types.h:67