BigW Consortium Gitlab

Commit d59f4898 by Sean McGivern

Merge branch 'bb_save_trace' into 'master'

[BB Importer] Save the error trace and the whole raw document See merge request !9604
parents a62ae94d 3bc114a7
---
title: "[BB Importer] Save the error trace and the whole raw document to debug problems
easier"
merge_request:
author:
module Bitbucket
module Representation
class Base
attr_reader :raw
def initialize(raw)
@raw = raw
end
......@@ -8,10 +10,6 @@ module Bitbucket
def self.decorate(entries)
entries.map { |entry| new(entry)}
end
private
attr_reader :raw
end
end
end
......@@ -149,7 +149,7 @@ module Gitlab
description += @formatter.author_line(pull_request.author) unless find_user_id(pull_request.author)
description += pull_request.description
merge_request = project.merge_requests.create(
merge_request = project.merge_requests.create!(
iid: pull_request.iid,
title: pull_request.title,
description: description,
......@@ -168,7 +168,7 @@ module Gitlab
import_pull_request_comments(pull_request, merge_request) if merge_request.persisted?
rescue StandardError => e
errors << { type: :pull_request, iid: pull_request.iid, errors: e.message }
errors << { type: :pull_request, iid: pull_request.iid, errors: e.message, trace: e.backtrace.join("\n"), raw_response: pull_request.raw }
end
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment