Commit d59f4898 authored by Sean McGivern's avatar 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 Bitbucket
module Representation module Representation
class Base class Base
attr_reader :raw
def initialize(raw) def initialize(raw)
@raw = raw @raw = raw
end end
...@@ -8,10 +10,6 @@ module Bitbucket ...@@ -8,10 +10,6 @@ module Bitbucket
def self.decorate(entries) def self.decorate(entries)
entries.map { |entry| new(entry)} entries.map { |entry| new(entry)}
end end
private
attr_reader :raw
end end
end end
end end
...@@ -149,7 +149,7 @@ module Gitlab ...@@ -149,7 +149,7 @@ module Gitlab
description += @formatter.author_line(pull_request.author) unless find_user_id(pull_request.author) description += @formatter.author_line(pull_request.author) unless find_user_id(pull_request.author)
description += pull_request.description description += pull_request.description
merge_request = project.merge_requests.create( merge_request = project.merge_requests.create!(
iid: pull_request.iid, iid: pull_request.iid,
title: pull_request.title, title: pull_request.title,
description: description, description: description,
...@@ -168,7 +168,7 @@ module Gitlab ...@@ -168,7 +168,7 @@ module Gitlab
import_pull_request_comments(pull_request, merge_request) if merge_request.persisted? import_pull_request_comments(pull_request, merge_request) if merge_request.persisted?
rescue StandardError => e 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 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