client.monitor.alerts.list does not fetch 30003, 30005 errors although they are seen on twilio monitor GUI
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reproducing the client.monitor.alerts.list(start_date: 1.week.ago) query and filtering for error codes 30003 and 30005, using the reported Ruby and twilio-ruby versions. Compare the returned alerts with the corresponding Twilio Monitor GUI and Message logs; done means the discrepancy is explained or consistently reproduced.
Written by the indexing model from the issue text.
Description
Issue Summary
We have code that fetches all twilio alerts within the last 1 week. For each of these alerts, we create an alert object (TwilioAlert) in our DB. However, we have not created TwilioAlert with error_code 30003, 30005 before (we've been using this code for years). But we suddenly started seeing these errors come in starting July 1st (no code change to the code shown below). And now we've suddenly stopped seeing them since July 15th, but they are present in twilio monitor GUI. Furthermore, according to twilio monitor GUI, we have had these alerts at least for the last 4 months, we just haven't been seeing them be created in our db. Has anyone else had this issue and what could explain this discrepancy?
Currently, I see many 30003 errors on July 23rd, 2024 when I search for them in Message logs on Twilio but if I search for the error_code 30003 using:
client.monitor.alerts.list(start_date: 1.week.ago).filter { |a| a.error_code == '30003' }, I don't see any come back.
I have reached out to twilio support and received no indication that they have changed anything. I'm wondering if anyone is experiencing similar issues or has any suggestions for why this might be happening.
Code Snippet
client = Twilio::REST::Client.new
alerts = client.monitor.alerts.list(start_date: 1.week.ago)
alerts.each do |alert|
TwilioAlert.find_or_create_by(resource_sid: alert.resource_sid) do |record|
record.error_code = alert.error_code
record.request_url = alert.request_url
record.request_variables = alert.request_variables
record.date_alert_created = alert.date_created
record.resolve_status = :unresolved
end
end
Technical details:
- twilio-ruby version: 7.2.1 (Jun 28 -> Jul 10), 7.2.3 (since Jul 10)
- ruby version: 3.1.4
- Dominant language
- Ruby
- Stars
- 1.4k
- Forks
- 472
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from twilio/twilio-ruby
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
twilio/twilio-ruby#785 ·
-
type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
twilio/twilio-ruby#784 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
twilio/twilio-ruby#802 · 1 comment ·
-
priority: medium status: work in progress type: bug
Difficulty 3/5 1-2 days Newbie friendliness 35/100
twilio/twilio-ruby#699 · 2 comments ·
-
priority: medium status: waiting for feedback type: bug
Difficulty 4/5 3-5 days Newbie friendliness 25/100
twilio/twilio-ruby#690 · 3 comments ·
All issues in twilio/twilio-ruby
Similar issues
-
バグ
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
voxpupuli/puppet-epel#186 · 1 comment ·
-
external_created_at is no longer used for the message timestamp since the new message UI (v4.4.0) OpenBug Frontend
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
TheOdinProject/curriculum#31402 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100