RawLogsClient search parameter is parameter is hardcoded to "search" instead of "q"
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
Research direction
Start in src/main/java/com/auth0/client/mgmt/RawLogsClient.java at lines 167-170, then compare the request parameter with the linked Auth0 logs API documentation. Use the LogsClient search reproduction to verify that the logs request is accepted instead of returning the query_syntax_error response.
Written by the indexing model from the issue text.
Description
Checklist
- I have looked into the Readme and Examples, and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
The code is hardcodes search instead of q as the search criteria name, docs: https://auth0.com/docs/api/management/v2/logs/get-logs
now:
if (!request.getSearch().isAbsent()) {
QueryStringMapper.addQueryParameter(
httpUrl, "search", request.getSearch().orElse(null), false);
}
fails with:
BadRequestError, statusCode: 400, body: {
"statusCode" : 400,
"error" : "Bad Request",
"message" : "The query 'undefined' cannot be parsed. Please revise the query or visit https://auth0.com/docs/logs/log-search-query-syntax for help.",
"code" : "query_syntax_error"
}}
Reproduction
- Use the logs search api:
LogsClient logsClient = managementApi.logs();
String searchQuery = request.toSearchQuery(org.getId());
ListLogsRequestParameters.Builder paramsBuilder =
ListLogsRequestParameters.builder()
.search(searchQuery)
.sort("date:-1");
Additional context
No response
auth0-java version
latest (3.3.0)
Java version
21
- Dominant language
- Java
- Stars
- 319
- Forks
- 155
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 12
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 auth0/auth0-java
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
auth0/auth0-java#887 ·
-
bug
Difficulty 5/5 Over a week Newbie friendliness 35/100
auth0/auth0-java#911 ·
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 25/100
auth0/auth0-java#897 ·
-
feature request
Difficulty 1/5 Under an hour Newbie friendliness 50/100
auth0/auth0-java#754 · 2 comments ·
All issues in auth0/auth0-java
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
elastic/gradle-plugins#157 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
cryptomator/hub#497 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
johanhaleby/occurrent#1120 ·