Work around classic JS error inheritance issues.
Fix Promise in REST client.