Only send traceback to users when in debug mode

API services currently send the traceback to clients. While the client
hides it from user view, it is still present in the response, exposing
the service to details of the engine that administrators likely would
not like to have exposed.

Fixes bug #1210623

Change-Id: I554ba24b7ac9166e28a8a0a10f566ed9cfa03014
Merge "Only send traceback to users when in debug mode"