Changed JSONResult to throw exceptions for invalid handling