Cange these three lines into:

    log_halt 503, "Unable to forward to Foreman server: #{e}"