You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2019/03/28 19:27:50 UTC
[hbase] branch branch-2.0 updated: HBASE-22123 REST gateway reports
Insufficient permissions exceptions as 404 Not Found
This is an automated email from the ASF dual-hosted git repository.
stack pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new e92676c HBASE-22123 REST gateway reports Insufficient permissions exceptions as 404 Not Found
e92676c is described below
commit e92676c0b20959dc1f87404274dc3af203f566d0
Author: Tomas Sokorai <>
AuthorDate: Thu Mar 28 12:23:49 2019 -0700
HBASE-22123 REST gateway reports Insufficient permissions exceptions as 404 Not Found
---
.../main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java
index d08204d..9bc3ec3 100644
--- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java
+++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResultGenerator.java
@@ -26,6 +26,7 @@ import java.util.NoSuchElementException;
import org.apache.hadoop.hbase.Cell;
import org.apache.hadoop.hbase.CellUtil;
import org.apache.hadoop.hbase.DoNotRetryIOException;
+import org.apache.hadoop.hbase.security.AccessDeniedException;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.client.Table;
@@ -78,6 +79,10 @@ public class RowResultGenerator extends ResultGenerator {
// help to avoid confusion by leaving a record of what happened here in
// the log.
LOG.warn(StringUtils.stringifyException(e));
+ // Lets get the exception rethrown to get a more meaningful error message than 404
+ if (e instanceof AccessDeniedException) {
+ throw e;
+ }
} finally {
table.close();
}