seunggabi opened a new pull request, #44513:
URL: https://github.com/apache/superset/pull/44513

   ### SUMMARY
   #44238 added a `getClientErrorObject(response)` call to the `savePublished` 
error handler in `superset-frontend/src/dashboard/actions/dashboardState.ts` 
but did not import the helper. On `master` this fails `lint-frontend` with 
`eslint(no-undef): 'getClientErrorObject' is not defined` and makes every 
`savePublished` error-path test in `dashboardState.test.ts` throw 
`ReferenceError: getClientErrorObject is not defined` (see the Frontend Build 
CI run on 86fb8db, and any PR opened since the merge). At runtime the publish 
toggle would crash instead of showing the server's error message.
   
   The merge of #44238 went green because `lint-frontend` and the jest shard 
were skipped by the path filter on that push.
   
   This adds `getClientErrorObject` to the existing `@superset-ui/core` import 
block, which is where every other file under `src/dashboard` imports it from. 
No behaviour change beyond restoring what #44238 intended.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A
   
   ### TESTING INSTRUCTIONS
   ```bash
   cd superset-frontend
   npx oxlint --config oxlint.json --quiet 
src/dashboard/actions/dashboardState.ts
   npx jest src/dashboard/actions/dashboardState.test.ts
   ```
   On `master` the first command reports the `no-undef` error and 6 tests fail 
with `ReferenceError`; with this change lint is clean and all 40 tests pass.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to