Skip to content

Commit c233c4e

Browse files
Merge pull request #46 from docusign/DEVDOCS-6473
Fixed Rooms API ex8/9 displaying call stack error
2 parents ac1792f + 0b6bb20 commit c233c4e

3 files changed

Lines changed: 16 additions & 7 deletions

File tree

app/rooms/examples/eg008_grant_office_access_to_form_group/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ def get_view():
5656
args = Eg008Controller.get_args()
5757

5858
# 2. Get Form Groups
59-
form_groups = Eg008Controller.get_form_groups(args)
59+
try:
60+
form_groups = Eg008Controller.get_form_groups(args)
61+
except ApiException as err:
62+
return process_error(err)
6063

6164
# 3. Get offices
6265
offices = Eg008Controller.get_offices(args)

app/rooms/examples/eg009_assign_form_to_form_group/views.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ def get_view():
6565
args = Eg009Controller.get_args()
6666

6767
# 2. Get form groups
68-
form_groups = Eg009Controller.get_form_groups(args)
68+
try:
69+
form_groups = Eg009Controller.get_form_groups(args)
70+
except ApiException as err:
71+
return process_error(err)
6972

7073
# 3. Get forms
7174
forms = Eg009Controller.get_forms(args)

app/rooms/templates/error.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55

66
<div class="container" style="margin-top: 40px; margin-left: 300px">
77

8-
<h2>Problem: an error occurred</h2>
9-
<p>Error information:</p>
8+
<h2>Error</h2>
109

11-
{% if error_code %}
12-
<p>{{ error_code }}: {{ error_message }}</p>
10+
{% if error_code == 'FORMS_INTEGRATION_NOT_ENABLED' %}
11+
<p>{{ error_code }}: Please contact your DocuSign Account Manager or Business Development representative to enable Forms for this account.</p>
1312
{% else %}
14-
<p><pre>{{ err }}</pre></p>
13+
{% if error_code %}
14+
<p>{{ error_code }}: {{ error_message }}</p>
15+
{% else %}
16+
<p><pre>{{ err }}</pre></p>
17+
{% endif %}
1518
{% endif %}
1619

1720

0 commit comments

Comments
 (0)