bcgov / bcgov/entity

Legal API: unhandled exceptions should not return "CORS error"

Open
#2,124 0 comments 0 reactions 0 assignees View on GitHub
ENTITY - DO NOT USE Priority2 techdebt
Dominant language
JavaScript
Stars
23
Forks
62
Avg merge
24m
Merged PRs (30d)
1

Description

## Description:
When there is an exception in the API call , the browser is not getting the correct CORS header by which the original exception is interpreted as a CORS issue. This happens only for exceptions in the server side.

This needs to be fixed so that KeyCloak token refreshes can be implemented using interceptors. (They are initially being implemented using timers due to the subject errors.)

Sample error:
![cors error.PNG](https://images.zenhubusercontent.com/5d0a7edda4644173e93bf808/dddef2b5-87a5-4487-82b4-aed4da221942)

Ref: https://app.zenhub.com/workspaces/entity-5bf2f2164b5806bc2bf60531/issues/bcgov/entity/2076

**Dependencies**

**Acceptance Criteria**

**Validation Rules**

Sprint level Definition of Ready
- [ ] Do we have a prioritized Sprint backlog?
- [ ] Defects, user stories and other work the team has committed to are contained in the sprint backlog?
- [ ] Any hidden work?
- [ ] All team members availability & capacity is known for the sprint?
- [ ] All users stories meet the definition of Ready?

Definition of Ready:
- [ ] Have Stakeholders approved this story?
- [ ] Does User story have full flow of business rules, happy and alternate paths etc. ?
- [ ] Are the dependies known/understood?
- [ ] Dev team accepts user experience artifacts?
- [ ] Are the validation rules defined? (UI, Data, Role-Action)
- [ ] Is a formal UAT required for this user story?
- [ ] Are the acceptance criteria well defined in this ticket (Story level) that QA can confirm or deny ?
- [ ] Does user story need to reference BA checklist? ( are functional/Non functional descriptions captured ?)
- [ ] Is the person who accepts this user story as complete identified? (PO)
- [ ] Can this User story be sized by the Dev. team ?
- [ ] Can this User story be demoed to show value?
- [ ] Is this user story small enough to be completed in a sprint?

Definition of Done:
- [ ] PR to remove feature flags created
- [ ] Check Requirements against completed stories
- [ ] Completed stories verified in Dev/Test/Prod
- [ ] Confirm Test cases built and succeeding
- [ ] Confirm successful End-End runs
- [ ] No regression
- [ ] All Linters passed
- [ ] Test coverage and Test ID acceptable by Product owner
- [ ] Ticket merged to master or story branch
- [ ] Add / maintain selectors for QA purposes
- [ ] Add PR numbers - If available
- [ ] All tests passed (Jest, Pytest, Postman)
- [ ] Developer to list Config changes/ Update documents and designs
- [ ] Design / Solution accepted by Product Owner
- [ ] Acceptance criteria has been defined (happy path, known sad paths)
- [ ] Test coverage acceptable
- [ ] Peer Reviewed
- [ ] Accessibility reviewed and acceptable [checklist](https://github.com/bcgov/entity/docs/coding-standards/accessibility.md)
- [ ] UX Approved
- [ ] PR Accepted
- [ ] Production burn in completed
- [ ] Integration testing completed

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.