Skip to content

Commit 4453d91

Browse files
committed
Updated README.md
1 parent c92e7e4 commit 4453d91

File tree

2 files changed

+111
-0
lines changed

2 files changed

+111
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
# Python Open Policy Agent (OPA) Client
22

3+
[![MIT licensed](https://img.shields.io/github/license/Turall/OPA-python-client)](https://raw.githubusercontent.com/Turall/OPA-python-client/master/LICENSE)
4+
[![GitHub stars](https://img.shields.io/github/stars/Turall/OPA-python-client.svg)](https://github.com/Turall/OPA-python-client/stargazers)
5+
[![GitHub forks](https://img.shields.io/github/forks/Turall/OPA-python-client.svg)](https://github.com/Turall/OPA-python-client/network)
6+
[![GitHub issues](https://img.shields.io/github/issues-raw/Turall/OPA-python-client)](https://github.com/Turall/OPA-python-client/issues)
37
[![Downloads](https://pepy.tech/badge/opa-python-client)](https://pepy.tech/project/opa-python-client)
48

9+
510
See offical documentation page [Open Policy Agent](https://www.openpolicyagent.org/docs/latest/)
611

712

opa_client/errors.py

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
class ConnectionsError(Exception):
2+
def __init__(self, expression, message):
3+
"""
4+
expression -- input expression in which the error occurred
5+
message -- explanation of the error
6+
"""
7+
self.expression = expression
8+
self.message = message
9+
10+
11+
class QueryExecuteError(Exception):
12+
def __init__(self, expression, message):
13+
"""
14+
expression -- input expression in which the error occurred
15+
message -- explanation of the error
16+
"""
17+
self.expression = expression
18+
self.message = message
19+
20+
21+
class PolicyNotFoundError(Exception):
22+
def __init__(self, expression, message):
23+
"""
24+
expression -- input expression in which the error occurred
25+
message -- explanation of the error
26+
"""
27+
self.expression = expression
28+
self.message = message
29+
30+
31+
class CheckPermissionError(Exception):
32+
def __init__(self, expression, message):
33+
"""
34+
expression -- input expression in which the error occurred
35+
message -- explanation of the error
36+
"""
37+
self.expression = expression
38+
self.message = message
39+
40+
41+
class DeleteDataError(Exception):
42+
def __init__(self, expression, message):
43+
"""
44+
expression -- input expression in which the error occurred
45+
message -- explanation of the error
46+
"""
47+
self.expression = expression
48+
self.message = message
49+
50+
51+
class DeletePolicyError(Exception):
52+
def __init__(self, expression, message):
53+
"""
54+
expression -- input expression in which the error occurred
55+
message -- explanation of the error
56+
"""
57+
self.expression = expression
58+
self.message = message
59+
60+
61+
class PathNotFoundError(Exception):
62+
def __init__(self, expression, message):
63+
"""
64+
expression -- input expression in which the error occurred
65+
message -- explanation of the error
66+
"""
67+
self.expression = expression
68+
self.message = message
69+
70+
71+
class RegoParseError(Exception):
72+
def __init__(self, expression, message):
73+
"""
74+
expression -- input expression in which the error occurred
75+
message -- explanation of the error
76+
"""
77+
self.expression = expression
78+
self.message = message
79+
80+
81+
class SSLError(Exception):
82+
def __init__(self, expression, message):
83+
"""
84+
expression -- input expression in which the error occurred
85+
message -- explanation of the error
86+
"""
87+
self.expression = expression
88+
self.message = message
89+
90+
91+
class FileError(ValueError):
92+
def __init__(self, expression, message):
93+
"""
94+
expression -- input expression in which the error occurred
95+
message -- explanation of the error
96+
"""
97+
self.expression = expression
98+
self.message = message
99+
100+
101+
class TypeExecption(TypeError):
102+
def __init__(self, expression):
103+
"""
104+
expression -- input expression in which the error occurred
105+
"""
106+
self.expression = expression

0 commit comments

Comments
 (0)