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

Web-App: Missing / in API calls causing unnecessary redirect #2366

Open
exalate-issue-sync bot opened this issue Nov 14, 2024 · 7 comments
Open

Web-App: Missing / in API calls causing unnecessary redirect #2366

exalate-issue-sync bot opened this issue Nov 14, 2024 · 7 comments
Assignees

Comments

@exalate-issue-sync
Copy link

exalate-issue-sync bot commented Nov 14, 2024

Add / to API calls that are missing them so that we avoid unnecessary redirects.

  • Identify API calls missing / at the end that are causing redirects (example below)
  • Add / to urls

Recreating the issue:

  • Log in to https://dev.fecfile.fec.gov/
  • Open your network tab of your browser tools
  • Edit any report
  • See 2 calls per API call - one without the / and the second one with the redirect

![image (1).png](/attachments/13517?name=image (1).png)

QA Notes

  • This is a front-end ticket, but the app is calling on the API.
  • For testing, dev will provide proof of unit tests and E2E tests passing.

DEV Notes

Build out unit tests that future-proof so we don’t run into this error again.

For testing, provide proof of unit tests and E2E tests passing

Design

null

See full ticket and images here: FECFILE-1785

@exalate-issue-sync exalate-issue-sync bot changed the title Missing / in API calls causing uneccessary redirect Missing / in API calls causing unnecessary redirect Nov 14, 2024
Copy link
Author

akhorsand commented: [~accountid:712020:2a1493e5-adee-45bd-b27e-868a5c8d3f62] what should the outcome of this ticket be? This is assigned for Sprint 52 - can you add some detail and get it ready for pointing?

Copy link
Author

Todd Lees commented: [~accountid:61b0b42cd5986c006a9e1c94] added prescriptive content

@exalate-issue-sync exalate-issue-sync bot changed the title Missing / in API calls causing unnecessary redirect Web-App: Missing / in API calls causing unnecessary redirect Nov 20, 2024
Copy link
Author

akhorsand commented: Moving back to AA to talk through potential unit tests.

Copy link
Author

Sasha Dresden commented: Created a PR to demo using an interceptor with some generic tests for it.
[https://github.com//pull/2390|https://github.com//pull/2390|smart-link]

Copy link
Author

Sasha Dresden commented: API: [https://github.com/fecgov/fecfile-web-api/pull/1239|https://github.com/fecgov/fecfile-web-api/pull/1239|smart-link]
APP: [https://github.com//pull/2390|https://github.com//pull/2390|smart-link]

Copy link
Author

Todd Lees commented: urls now include {{/}} and are not redirecting

!image-20241213-224223.png|width=626,height=31,alt="image-20241213-224223.png"!

Copy link
Author

Todd Lees commented: passes cr moving to qa

[https://app.circleci.com/pipelines/github/fecgov/fecfile-web-app/7055/workflows/3ba9220e-db83-42d9-9e47-6cbcc18220f9/jobs/23943|https://app.circleci.com/pipelines/github/fecgov/fecfile-web-app/7055/workflows/3ba9220e-db83-42d9-9e47-6cbcc18220f9/jobs/23943]

see successful test of url in comment below

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

No branches or pull requests

3 participants