Skip to content

Commit 1946c7e

Browse files
committed
2 parents 569aaa6 + 01dc803 commit 1946c7e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Services/MonitorApiClientService.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use DocuSign\Monitor\Client\ApiException;
77
use DocuSign\Monitor\Configuration;
88

9+
910
class MonitorApiClientService
1011
{
1112
/**
@@ -56,6 +57,17 @@ public function getApiClient(): ApiClient
5657
public function showErrorTemplate(ApiException $e): void
5758
{
5859
$body = $e->getResponseBody();
60+
if ($e->getCode()==403 && empty($body)) {
61+
$GLOBALS['twig']->display(
62+
'error.html',
63+
[
64+
'error_code' => " ",
65+
'error_message' => "Please enable DocuSign Monitor in your account. See <a target=_BLANK href='https://developers.docusign.com/docs/monitor-api/how-to/enable-monitor/'>How to enable DocuSign Monitor for your organization</a> for details."
66+
]
67+
);
68+
}
69+
70+
else {
5971

6072
$GLOBALS['twig']->display(
6173
'error.html',
@@ -66,6 +78,7 @@ public function showErrorTemplate(ApiException $e): void
6678
]
6779
);
6880
}
81+
}
6982

7083
/**
7184
* Redirect user to results page

0 commit comments

Comments
 (0)