Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
atlas
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dataplatform
atlas
Commits
de6122fa
Commit
de6122fa
authored
Dec 07, 2016
by
apoorvnaik
Committed by
Suma Shivaprasad
Dec 07, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ATLAS-1355: Fix for bad error translation from V2 API
parent
78c835ed
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
release-log.txt
release-log.txt
+1
-0
TypesResource.java
...in/java/org/apache/atlas/web/resources/TypesResource.java
+6
-0
TypesREST.java
...pp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
+3
-5
No files found.
release-log.txt
View file @
de6122fa
...
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
...
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
ALL CHANGES:
ALL CHANGES:
ATLAS-1355: Fix for bad error translation from V2 API (apoorvnaik via sumasai)
ATLAS-1351 HiveHook fails with NPE for hive process registration (vimalsharma via sumasai)
ATLAS-1351 HiveHook fails with NPE for hive process registration (vimalsharma via sumasai)
ATLAS-1342 Titan Solrclient - Add timeouts for zookeeper connect and session (sumasai)
ATLAS-1342 Titan Solrclient - Add timeouts for zookeeper connect and session (sumasai)
ATLAS-1353 Invalid error message(500 internal server error) for lineage query on non-existing table. (sumasai)
ATLAS-1353 Invalid error message(500 internal server error) for lineage query on non-existing table. (sumasai)
...
...
webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java
View file @
de6122fa
...
@@ -121,6 +121,9 @@ public class TypesResource {
...
@@ -121,6 +121,9 @@ public class TypesResource {
}
catch
(
IllegalArgumentException
e
)
{
}
catch
(
IllegalArgumentException
e
)
{
LOG
.
error
(
"Unable to persist types"
,
e
);
LOG
.
error
(
"Unable to persist types"
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
BAD_REQUEST
));
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
BAD_REQUEST
));
}
catch
(
WebApplicationException
e
)
{
LOG
.
error
(
"Unable to persist types due to V2 API error"
,
e
);
throw
e
;
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
LOG
.
error
(
"Unable to persist types"
,
e
);
LOG
.
error
(
"Unable to persist types"
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
...
@@ -168,6 +171,9 @@ public class TypesResource {
...
@@ -168,6 +171,9 @@ public class TypesResource {
}
catch
(
AtlasException
|
IllegalArgumentException
e
)
{
}
catch
(
AtlasException
|
IllegalArgumentException
e
)
{
LOG
.
error
(
"Unable to persist types"
,
e
);
LOG
.
error
(
"Unable to persist types"
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
BAD_REQUEST
));
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
BAD_REQUEST
));
}
catch
(
WebApplicationException
e
)
{
LOG
.
error
(
"Unable to persist types due to V2 API error"
,
e
);
throw
e
;
}
catch
(
Throwable
e
)
{
}
catch
(
Throwable
e
)
{
LOG
.
error
(
"Unable to persist types"
,
e
);
LOG
.
error
(
"Unable to persist types"
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
...
...
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
View file @
de6122fa
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
package
org
.
apache
.
atlas
.
web
.
rest
;
package
org
.
apache
.
atlas
.
web
.
rest
;
import
com.google.inject.Inject
;
import
com.google.inject.Inject
;
import
org.apache.atlas.exception.AtlasBaseException
;
import
org.apache.atlas.exception.AtlasBaseException
;
import
org.apache.atlas.model.SearchFilter
;
import
org.apache.atlas.model.SearchFilter
;
import
org.apache.atlas.model.typedef.AtlasClassificationDef
;
import
org.apache.atlas.model.typedef.AtlasClassificationDef
;
...
@@ -38,9 +37,6 @@ import org.apache.http.annotation.Experimental;
...
@@ -38,9 +37,6 @@ import org.apache.http.annotation.Experimental;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
java.util.List
;
import
java.util.Set
;
import
javax.inject.Singleton
;
import
javax.inject.Singleton
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.Consumes
;
import
javax.ws.rs.Consumes
;
...
@@ -54,6 +50,8 @@ import javax.ws.rs.Produces;
...
@@ -54,6 +50,8 @@ import javax.ws.rs.Produces;
import
javax.ws.rs.WebApplicationException
;
import
javax.ws.rs.WebApplicationException
;
import
javax.ws.rs.core.Context
;
import
javax.ws.rs.core.Context
;
import
javax.ws.rs.core.Response
;
import
javax.ws.rs.core.Response
;
import
java.util.List
;
import
java.util.Set
;
@Path
(
"v2/types"
)
@Path
(
"v2/types"
)
...
@@ -457,7 +455,7 @@ public class TypesREST {
...
@@ -457,7 +455,7 @@ public class TypesREST {
try
{
try
{
ret
=
typeDefStore
.
updateTypesDef
(
typesDef
);
ret
=
typeDefStore
.
updateTypesDef
(
typesDef
);
}
catch
(
AtlasBaseException
ex
)
{
}
catch
(
AtlasBaseException
ex
)
{
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
ex
,
Response
.
Status
.
NOT_MODIFIED
));
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
ex
,
ex
.
getAtlasErrorCode
().
getHttpCode
()
));
}
}
return
ret
;
return
ret
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment