package uk.ac.ox.oucs.vle;

import java.util.HashMap;
import java.util.Map;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

public class WebAppForbiddenException extends WebApplicationException {
	
	private static final Map<String, String> myMap = new HashMap<String, String>();
	static {
		myMap.put("status", "failed");
		myMap.put("message", "Not Authorized");
	}

	public WebAppForbiddenException() {
		super(Response
				.status(Response.Status.FORBIDDEN)
				.type(MediaType.APPLICATION_JSON)
				.entity(myMap)
				.build());
	}

}

@@ -521,16 +521,185 @@
 BIDDEN)%0A
+%09%09%09%09// We set the type as when the request doesn't have an accept header%0A%09%09%09%09// jersey will attempt to convert a Map to application/octet-stream%0A%09%09%09%09// which will fail.%0A
 %09%09%09%09.typ

Add note about why we force the media type.