Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(go): handle HTML errors [skip-bc] #4096

Merged
merged 2 commits into from
Nov 13, 2024
Merged

fix(go): handle HTML errors [skip-bc] #4096

merged 2 commits into from
Nov 13, 2024

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Nov 13, 2024

🧭 What and Why

GCP Cloud Armor can return raw HTML error, we can catch them and handle them gracefully instead of failing the json deserialization.

@millotp millotp self-assigned this Nov 13, 2024
@millotp millotp requested a review from a team as a code owner November 13, 2024 13:47
@algolia-bot
Copy link
Collaborator

algolia-bot commented Nov 13, 2024

✔️ Code generated!

Name Link
🪓 Triggered by f0e13e80807f9c22f0c33a10e64bb50f67fac890
🍃 Generated commit cb0c92fcd63f60a4eea3c91fbe7628c40f491ae6
🌲 Generated branch generated/fix/go-err-handling
📊 Benchmark results

Benchmarks performed on the method using a mock server, the results might not reflect the real-world performance.

Language Req/s
go 1602
php 1532
csharp 1410
javascript 1130
java 1112
python 1042
ruby 919
swift 751

@millotp millotp force-pushed the fix/go-err-handling branch from 4a67c4d to be36096 Compare November 13, 2024 13:50
@millotp millotp changed the title fix(go): handle HTML errors fix(go): handle HTML errors [skip-bc] Nov 13, 2024
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks much cleaner! let's not forget to add a test when we do other clients

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meant to approve gg

@millotp millotp merged commit fd69cf2 into main Nov 13, 2024
28 checks passed
@millotp millotp deleted the fix/go-err-handling branch November 13, 2024 14:49
algolia-bot added a commit that referenced this pull request Nov 13, 2024
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
algolia-bot added a commit to algolia/algoliasearch-client-go that referenced this pull request Nov 13, 2024
algolia/api-clients-automation#4096

Co-authored-by: algolia-bot <accounts+algolia-api-client-bot@algolia.com>
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
millotp added a commit that referenced this pull request Nov 18, 2024
millotp added a commit that referenced this pull request Nov 18, 2024
Co-authored-by: Pierre Millot <pierre.millot@algolia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants