Fix: RequestHelper silently swallows non-2xx responses, causing false success on Upload & Publish - #343
Draft
Power-Maverick with Copilot wants to merge 2 commits into
Draft
Fix: RequestHelper silently swallows non-2xx responses, causing false success on Upload & Publish#343Power-Maverick with Copilot wants to merge 2 commits into
Power-Maverick with Copilot wants to merge 2 commits into
Conversation
… undefined Co-authored-by: Power-Maverick <36135520+Power-Maverick@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix upload and publish notifications to reflect actual status
Fix: RequestHelper silently swallows non-2xx responses, causing false success on Upload & Publish
Aug 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RequestHelper.requestData/postData/patchDatareturnedundefinedfor any non-2xx, non-401 response. Callers likeuploadWebResourceInternalnever entered theircatchblock and unconditionally showed the success toast — even when the PATCH orPublishXmlwas rejected server-side (lock conflicts, permission errors, 503s, etc.).Changes
requestHelper.ts: Replacereturn undefinedin the non-Unauthorized error branch of all three HTTP methods with a call to a newraiseResponseErrorhelper that throws instead.raiseResponseError(new private method): Parses the Dataverse JSON error body (error.message/error.code) and throws with the server's human-readable message; falls back toRequest failed with status {N}if the body is unparseable.redirectTimeoutstub.The existing
catchinuploadWebResourceInternalalready showsErrorMessages.wrUploadErrorand logs the error — no changes needed there. Dataverse lock-conflict messages (e.g. "A solution import is in progress") will now appear verbatim in the error toast.