[API] Exception fixes

* Only pass detail=... if the exception derives from DetailError
* Change error[0] > error[1]
* Add ExhaustedError for exhausted resources

Change-Id: Idc6d1351e72068ae5313dc0f7fdbc0108d9cde13
Merge "[API] Exception fixes"