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
8 years ago
by
apoorvnaik
Committed by
Suma Shivaprasad
8 years ago
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
ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
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-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)
...
...
This diff is collapsed.
Click to expand it.
webapp/src/main/java/org/apache/atlas/web/resources/TypesResource.java
View file @
de6122fa
...
...
@@ -121,6 +121,9 @@ public class TypesResource {
}
catch
(
IllegalArgumentException
e
)
{
LOG
.
error
(
"Unable to persist types"
,
e
);
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
)
{
LOG
.
error
(
"Unable to persist types"
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
...
...
@@ -168,6 +171,9 @@ public class TypesResource {
}
catch
(
AtlasException
|
IllegalArgumentException
e
)
{
LOG
.
error
(
"Unable to persist types"
,
e
);
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
)
{
LOG
.
error
(
"Unable to persist types"
,
e
);
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
e
,
Response
.
Status
.
INTERNAL_SERVER_ERROR
));
...
...
This diff is collapsed.
Click to expand it.
webapp/src/main/java/org/apache/atlas/web/rest/TypesREST.java
View file @
de6122fa
...
...
@@ -18,7 +18,6 @@
package
org
.
apache
.
atlas
.
web
.
rest
;
import
com.google.inject.Inject
;
import
org.apache.atlas.exception.AtlasBaseException
;
import
org.apache.atlas.model.SearchFilter
;
import
org.apache.atlas.model.typedef.AtlasClassificationDef
;
...
...
@@ -38,9 +37,6 @@ import org.apache.http.annotation.Experimental;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.util.List
;
import
java.util.Set
;
import
javax.inject.Singleton
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.ws.rs.Consumes
;
...
...
@@ -54,6 +50,8 @@ import javax.ws.rs.Produces;
import
javax.ws.rs.WebApplicationException
;
import
javax.ws.rs.core.Context
;
import
javax.ws.rs.core.Response
;
import
java.util.List
;
import
java.util.Set
;
@Path
(
"v2/types"
)
...
...
@@ -457,7 +455,7 @@ public class TypesREST {
try
{
ret
=
typeDefStore
.
updateTypesDef
(
typesDef
);
}
catch
(
AtlasBaseException
ex
)
{
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
ex
,
Response
.
Status
.
NOT_MODIFIED
));
throw
new
WebApplicationException
(
Servlets
.
getErrorResponse
(
ex
,
ex
.
getAtlasErrorCode
().
getHttpCode
()
));
}
return
ret
;
...
...
This diff is collapsed.
Click to expand it.
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