Encode ActionExceptions to json