Removed superfluous try/catch around save call in ScopeAPI.
parent
4538d8fb14
commit
07686d8e00
|
@ -5,6 +5,9 @@ package org.mitre.oauth2.web;
|
|||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.EntityExistsException;
|
||||
import javax.persistence.TransactionRequiredException;
|
||||
|
||||
import org.mitre.oauth2.model.SystemScope;
|
||||
import org.mitre.oauth2.service.SystemScopeService;
|
||||
import org.slf4j.Logger;
|
||||
|
@ -117,14 +120,7 @@ public class ScopeAPI {
|
|||
return "jsonEntityView";
|
||||
}
|
||||
|
||||
try {
|
||||
scope = scopeService.save(scope);
|
||||
} catch (RuntimeException e) {
|
||||
logger.error("There was an error attempting to save scope: " + scope + " : " + e.getStackTrace().toString());
|
||||
m.put("code", HttpStatus.BAD_REQUEST);
|
||||
m.put("entity", "An error occurred while processing your request.");
|
||||
return "jsonEntityView";
|
||||
}
|
||||
|
||||
if (scope != null && scope.getId() != null) {
|
||||
|
||||
|
|
Loading…
Reference in New Issue