PromucFlow_constructor/app/client/src/api
Diljit f0b01827f9
fix: logout user if the session has expired between page switches (#40718)
## Description
If a user's session times out and the user navigates to a new page in an
application the user was not navigated to the login page. This change
makes sure that the user profile is updated in the redux store on page
change and the page response is validated using the response
interceptors.

This bug was introduced in [this
PR](https://github.com/appsmithorg/appsmith/pull/36096).

Fixes #`Issue Number`  
_or_  
Fixes `Issue URL`
> [!WARNING]  
> _If no issue exists, please create an issue first, and check with the
maintainers if the issue is valid._

## Automation

/ok-to-test tags="@tag.All"

### 🔍 Cypress test results
<!-- This is an auto-generated comment: Cypress test results  -->
> [!TIP]
> 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
> Workflow run:
<https://github.com/appsmithorg/appsmith/actions/runs/15155628540>
> Commit: a3349cda620d3af78d2604f9edea151f6f15408e
> <a
href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=15155628540&attempt=2"
target="_blank">Cypress dashboard</a>.
> Tags: `@tag.All`
> Spec:
> <hr>Wed, 21 May 2025 08:31:39 UTC
<!-- end of auto-generated comment: Cypress test results  -->


## Communication
Should the DevRel and Marketing teams inform users about this change?
- [ ] Yes
- [ ] No


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **Bug Fixes**
- Improved error handling when loading published page resources,
ensuring better management of API errors and user profile updates.
- **Refactor**
- Updated internal handling of API response error codes for consistency.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-21 16:32:19 +05:30
..
__tests__ feat: Remove hardcoding of upcoming integrations from client codebase #40047 (#40271) 2025-04-17 20:11:06 +05:30
core chore: Refactor API (#36412) 2024-09-25 16:29:21 +05:30
helpers chore: refactor faro (CE) (#40350) 2025-04-29 10:32:36 +05:30
interceptors chore: refactor faro (CE) (#40350) 2025-04-29 10:32:36 +05:30
services chore: make branchName a query param in consolidated api (#38851) 2025-01-28 16:05:11 +05:30
ActionAPI.tsx chore: Updating the spelling for runBehaviour (#40490) 2025-05-02 17:58:26 +05:30
Api.ts chore: add grafana faro sdk (CE) (#38301) 2024-12-26 10:37:41 +05:30
ApiResponses.tsx fix: logout user if the session has expired between page switches (#40718) 2025-05-21 16:32:19 +05:30
AppThemingApi.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
CloudServicesApi.ts chore: Remove CS URL in client (#37665) 2024-11-27 10:32:35 +05:30
GitSyncAPI.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
ImportApi.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
index.ts chore: Refactor API (#36412) 2024-09-25 16:29:21 +05:30
LibraryAPI.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
OAuthApi.ts chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
PageApi.tsx chore: Updating the spelling for runBehaviour (#40490) 2025-05-02 17:58:26 +05:30
PluginApi.ts feat: Remove hardcoding of upcoming integrations from client codebase #40047 (#40271) 2025-04-17 20:11:06 +05:30
ReleasesAPI.tsx
SearchApi.tsx chore: add blank line eslint rule (#36369) 2024-09-18 19:35:28 +03:00
TemplatesApi.ts chore: Remove deprecated organization from code (#38878) 2025-01-29 12:16:51 +05:30
types.ts feat: enable post run actions for plugin queries (#39325) 2025-02-24 14:48:34 +05:30