Added propagating API errors to HTTP response