Skip to content

Commit d1750c6

Browse files
committed
0.3.9.dev15: define some sort of scrub_keys
1 parent 422fcc6 commit d1750c6

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

.github/workflows/python-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
- name: Checkout repository
1515
uses: actions/checkout@v4
1616

17-
- name: Set up Python 3.13
17+
- name: Set up Python 3.10
1818
uses: actions/setup-python@v5
1919
with:
20-
python-version: '3.13'
20+
python-version: '3.10'
2121
cache: 'pip'
2222

2323
- name: Install dependencies

polyapi/poly_tables.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@
77
from polyapi.constants import JSONSCHEMA_TO_PYTHON_TYPE_MAP
88

99

10+
def scrub_keys(e: Exception) -> Dict[str, Any]:
11+
"""
12+
Scrub the keys of an exception to remove sensitive information.
13+
Returns a dictionary with the error message and type.
14+
"""
15+
return {
16+
"error": str(e),
17+
"type": type(e).__name__,
18+
"message": str(e),
19+
"args": getattr(e, 'args', None)
20+
}
21+
22+
1023
def execute_query(table_id, method, query):
1124
from polyapi import polyCustom
1225
from polyapi.poly.client_id import client_id

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools>=61.2", "wheel"]
33

44
[project]
55
name = "polyapi-python"
6-
version = "0.3.9.dev14"
6+
version = "0.3.9.dev15"
77
description = "The Python Client for PolyAPI, the IPaaS by Developers for Developers"
88
authors = [{ name = "Dan Fellin", email = "dan@polyapi.io" }]
99
dependencies = [

0 commit comments

Comments
 (0)