1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-24 22:42:05 +03:00

MCOL-5496: Merge CMAPI code to engine repo.

[add] cmapi code to engine
This commit is contained in:
mariadb-AlanMologorsky
2022-11-18 15:18:40 +02:00
committed by Alan Mologorsky
parent 77eedd1756
commit a079a2c944
93 changed files with 15218 additions and 0 deletions

View File

@ -0,0 +1,12 @@
import json
import cherrypy as cp
class APIError(cp.HTTPError):
def __init__(self, status: int = 500, message: str = ''):
super().__init__(status=status)
self._error_message = message
def set_response(self):
super().set_response()
response = cp.serving.response
response.body = json.dumps({'error': self._error_message}).encode()