Module: Sentry::Client::Issue

Included in:
Sentry::Client
Defined in:
lib/sentry/client/issue.rb

Constant Summary collapse

BadRequestError =
Class.new(StandardError)
ResponseInvalidSizeError =
Class.new(StandardError)
SENTRY_API_SORT_VALUE_MAP =
{
  # <accepted_by_client> => <accepted_by_sentry_api>
  'frequency' => 'freq',
  'first_seen' => 'new',
  'last_seen' => nil
}.freeze

Instance Method Summary collapse

Instance Method Details

#issue_details(issue_id:) ⇒ Object


32
33
34
35
36
# File 'lib/sentry/client/issue.rb', line 32

def issue_details(issue_id:)
  issue = get_issue(issue_id: issue_id)

  map_to_detailed_error(issue)
end

#list_issues(**keyword_args) ⇒ Object


16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/sentry/client/issue.rb', line 16

def list_issues(**keyword_args)
  response = get_issues(keyword_args)

  issues = response[:issues]
  pagination = response[:pagination]

  validate_size(issues)

  handle_mapping_exceptions do
    {
      issues: map_to_errors(issues),
      pagination: pagination
    }
  end
end

#update_issue(issue_id:, params:) ⇒ Object


38
39
40
# File 'lib/sentry/client/issue.rb', line 38

def update_issue(issue_id:, params:)
  http_put(api_urls.issue_url(issue_id), params)[:body]
end