Guard against empty policyID in openDraftWorkspaceRequest#89014
Guard against empty policyID in openDraftWorkspaceRequest#89014MelvinBot wants to merge 2 commits into
Conversation
The client was sending OpenDraftWorkspaceRequest with an empty policyID, causing Auth to throw 402 Missing policyID. The existing guard checked for '-1' and ID_FAKE but not for empty strings. Co-authored-by: Rushat Gabhane <rushatgabhane@users.noreply.github.com>
|
The |
|
The All three retry attempts hit the same TLS decryption failure. No code fix is needed — please re-run the failed job. |
|
@MelvinBot merge main please |
…cyIdInOpenDraftWorkspaceRequest Co-authored-by: Rushat Gabhane <rushatgabhane@users.noreply.github.com>
|
Done! Merged |
|
@MelvinBot shouldn't we use util? isEmpty ? |
|
The
Since |
Explanation of Change
The
openDraftWorkspaceRequestfunction guards against invalid policyIDs ('-1'andCONST.POLICY.ID_FAKE) but does not guard against an empty string. When a client sendsOpenDraftWorkspaceRequestwith an emptypolicyID, Auth throws402 Missing policyID, surfacing as anExpException. This change adds a falsy check (!policyID) to the existing guard to prevent the API call from being made with an empty policyID.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/629598
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.
Offline tests
N/A - this change prevents an API call from being made, no offline behavior change.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari