Skip to content

Commit 6389c87

Browse files
committed
Updated field names according to the protocol definition
1 parent 3105961 commit 6389c87

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sage_utils/wrappers.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ class Response(object):
88
ERROR_FIELD_NAME = 'error'
99
EVENT_FIELD_NAME = 'event-name'
1010

11+
ERROR_TYPE_FIELD_NAME = 'type'
12+
ERROR_DETAILS_FIELD_NAME = 'details'
13+
1114
def __init__(self, data=None, *args, **kwargs):
1215
super(Response, self).__init__()
1316
self.data = data
@@ -19,8 +22,8 @@ def from_error(cls, error_type, message, event_name=None):
1922

2023
response = {
2124
cls.ERROR_FIELD_NAME: {
22-
"type": error_type,
23-
"message": message
25+
cls.ERROR_TYPE_FIELD_NAME: error_type,
26+
cls.ERROR_DETAILS_FIELD_NAME: message
2427
},
2528
cls.EVENT_FIELD_NAME: event_name
2629
}

0 commit comments

Comments
 (0)