summaryrefslogtreecommitdiffstats
path: root/extensions/BzAPI/Extension.pm
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/BzAPI/Extension.pm')
-rw-r--r--extensions/BzAPI/Extension.pm8
1 files changed, 6 insertions, 2 deletions
diff --git a/extensions/BzAPI/Extension.pm b/extensions/BzAPI/Extension.pm
index 0790e6596..cd08369b0 100644
--- a/extensions/BzAPI/Extension.pm
+++ b/extensions/BzAPI/Extension.pm
@@ -146,8 +146,12 @@ sub webservice_rest_response {
$cache->{bzapi_rpc} ||= $rpc;
return if !Bugzilla->request_cache->{bzapi}
- || ref $$result ne 'HASH'
- || exists $$result->{error};
+ || ref $$result ne 'HASH';
+
+ if (exists $$result->{error}) {
+ $$result->{documentation} = BZAPI_DOC;
+ return;
+ }
# Load the appropriate response handler based on path and type
if (my $handler = _find_handler($rpc, 'response')) {