package nl.tudelft.ewi.dea.jaxrs.api;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;

import com.google.inject.servlet.RequestScoped;

@RequestScoped
@Path("api/exception")
public class ExceptionAASResource {

	@GET
	public Response throwException() {
		throw new RuntimeException("Your Exception-As-A-Service is served!");
	}

}

package nl.tudelft.ewi.dea.jaxrs.api;

import javax.ws.rs.GET;
import javax.ws.rs.Path;

import com.google.inject.servlet.RequestScoped;

@RequestScoped
@Path("api/exception")
public class ExceptionAASResource {

	@GET
	public void throwException() {
		throw new RuntimeException("Your Exception-As-A-Service is served!");
	}

}

--- 
+++ 
@@ -2,6 +2,7 @@
 
 import javax.ws.rs.GET;
 import javax.ws.rs.Path;
+import javax.ws.rs.core.Response;
 
 import com.google.inject.servlet.RequestScoped;
 
@@ -10,7 +11,7 @@
 public class ExceptionAASResource {
 
 	@GET
-	public void throwException() {
+	public Response throwException() {
 		throw new RuntimeException("Your Exception-As-A-Service is served!");
 	}
 
Return Response instead of void as per the spec.
