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

Calling getRequestUrl() result in the HTTP request to fail with Missing Authentication Token #313

Closed
matyasberry opened this issue Apr 14, 2022 · 1 comment
Labels
new-bug Bug report that needs triage Team Lamprey

Comments

@matyasberry
Copy link

matyasberry commented Apr 14, 2022

Subject of the issue

Calling getRequestUrl() result in the HTTP request to fail with Missing Authentication Token

Your environment

Manjaro Linux 5.17,
JDK 17,
Algo SDK 1.13

Steps to reproduce

var query = indexer
.lookupAccountTransactions(senderAddress)
.assetId(assetId)
.notePrefix(note.getBytes(StandardCharsets.UTF_8))
.limit(2L);
System.out.println("query = " + query.getRequestUrl());
query.execute();

Expected behaviour

Successful call, just like as if I did:

var result = indexer
.lookupAccountTransactions(senderAddress)
.assetId(assetId)
.notePrefix(note.getBytes(StandardCharsets.UTF_8))
.limit(2L).execute();

Actual behaviour

HTTP 403

The problem seems to be that calling getRequestUrl() results in multiple calls to LookupAccountTransactions.getRequestString() which keeps adding to the path segments resulting in a wrong url.

Acceptance Criterie

  • Calling getRequestUrl() should not have any side effects.
  • The example code should work.
@ghost
Copy link

ghost commented Jul 27, 2022

This looks same as #294 and I have an open pull request #304

@winder winder closed this as completed Aug 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bug Bug report that needs triage Team Lamprey
Projects
None yet
Development

No branches or pull requests

2 participants