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(java): use body as error message APIC-541 #734

Merged
merged 2 commits into from
Jun 23, 2022
Merged

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Jun 23, 2022

🧭 What and Why

🎟 JIRA Ticket: APIC-541

The message of an error response was just Forbidden or Bad request but we can get more detail through the body if there is one.

Changes included:

  • Remove unused enum
  • Return the body

🧪 Test

Try the playground with the search api key to get an error.

@millotp millotp self-assigned this Jun 23, 2022
@netlify
Copy link

netlify bot commented Jun 23, 2022

Deploy Preview for api-clients-automation canceled.

Name Link
🔨 Latest commit a6ff9e2
🔍 Latest deploy log https://app.netlify.com/sites/api-clients-automation/deploys/62b43738cf7b75000872a836

@millotp millotp requested review from a team, damcou and shortcuts and removed request for a team June 23, 2022 09:34
@algolia-bot
Copy link
Collaborator

algolia-bot commented Jun 23, 2022

✗ The generated branch has been deleted.

If the PR has been merged, you can check the generated code on the main branch.
You can still access the code generated on main via this commit.

shortcuts
shortcuts previously approved these changes Jun 23, 2022
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.

noice!

@millotp
Copy link
Collaborator Author

millotp commented Jun 23, 2022

sorry I missed a null check

@@ -59,7 +59,7 @@ public Response intercept(Chain chain) throws IOException {
continue;
}
String message = response.message();
if (response.body()) {
if (response.body() != null) {
Copy link
Member

Choose a reason for hiding this comment

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

TIL my noob self did not knew the short check did not worked 😮‍💨

@millotp millotp merged commit 1756059 into main Jun 23, 2022
@millotp millotp deleted the fix/java-err-body branch June 23, 2022 09:57
algolia-bot added a commit to algolia/algoliasearch-client-java that referenced this pull request Jun 23, 2022
algolia/api-clients-automation#734

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