diff options
author | David Lawrence <dkl@mozilla.com> | 2014-08-26 21:45:40 +0200 |
---|---|---|
committer | David Lawrence <dkl@mozilla.com> | 2014-08-26 21:45:40 +0200 |
commit | b888aaa25fd0775e022e196ed8f56e766e766098 (patch) | |
tree | d7dbd977106816c113a3e3740c07dc0274743b5a /extensions/BzAPI/Extension.pm | |
parent | bfc1cfe2b6f723b260d90363b7eccbb8e3297f89 (diff) | |
download | bugzilla-b888aaa25fd0775e022e196ed8f56e766e766098.tar.gz bugzilla-b888aaa25fd0775e022e196ed8f56e766e766098.tar.xz |
Bug 1057774: bzAPI landing page gives a 404
Diffstat (limited to 'extensions/BzAPI/Extension.pm')
-rw-r--r-- | extensions/BzAPI/Extension.pm | 8 |
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')) { |