Provides server actions to raise an extended rest error and to customize the response. As described in As described in this documentation Customize REST API Responses page.You may provide a custom UserMesssage and or Developer Message that will override the default.
Added logic to detect an error response before deserializing to prevent errors.