This is maybe too complicated, why not something like:

`
    if SETTINGS.abrt_server_url
       result = Proxy::AbrtProxy::faf_request "/reports/new/", ureport_json
       response = result.body if result && result.code.to_s == STATUS_ACCEPTED.to_s
    else
       # FAF source that generates replies is in src/webfaf/reports/views.py
       response = { "result" => false,
                    "message" => "Report forwarded to Foreman server" }.to_json
     end