Use Exception type to set correct HTTP status code.