improved HTTP error messages ExpectationFailed => InternalServerError
minor improvement in Scala match statement