Expand query option

* support query param expand to change serialization group to details
* error handling improvement.