comparison artifact-database/src/main/java/de/intevation/artifactdatabase/rest/ArtifactResource.java @ 35:7a01a464a83b

More warning log output in POST case in REST interface of artifact. artifacts/trunk@89 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 15 Sep 2009 10:41:19 +0000
parents 9935e1c928de
children af22d4de275c
comparison
equal deleted inserted replaced
34:9935e1c928de 35:7a01a464a83b
65 return new DomRepresentation( 65 return new DomRepresentation(
66 MediaType.APPLICATION_XML, 66 MediaType.APPLICATION_XML,
67 db.describe(identifier)); 67 db.describe(identifier));
68 } 68 }
69 catch (ArtifactDatabaseException adbe) { 69 catch (ArtifactDatabaseException adbe) {
70 logger.warn(adbe,adbe); 70 logger.warn(adbe.getLocalizedMessage(), adbe);
71 Response response = getResponse(); 71 Response response = getResponse();
72 response.setStatus( 72 response.setStatus(
73 Status.CLIENT_ERROR_NOT_FOUND, adbe.getMessage()); 73 Status.CLIENT_ERROR_NOT_FOUND, adbe.getMessage());
74 return new EmptyRepresentation(); 74 return new EmptyRepresentation();
75 } 75 }
93 else { 93 else {
94 throw new ArtifactDatabaseException(NO_SUCH_ACTION_MESSAGE); 94 throw new ArtifactDatabaseException(NO_SUCH_ACTION_MESSAGE);
95 } 95 }
96 } 96 }
97 catch (ArtifactDatabaseException adbe) { 97 catch (ArtifactDatabaseException adbe) {
98 logger.warn(adbe.getLocalizedMessage(), adbe);
98 Response response = getResponse(); 99 Response response = getResponse();
99 response.setStatus( 100 response.setStatus(
100 Status.CLIENT_ERROR_BAD_REQUEST, adbe.getMessage()); 101 Status.CLIENT_ERROR_BAD_REQUEST, adbe.getMessage());
101 return new EmptyRepresentation(); 102 return new EmptyRepresentation();
102 } 103 }

http://dive4elements.wald.intevation.org