Skip to content

fix: return a clear error when a transformation read 500s - #17

Open
MarcusSchoelzel wants to merge 1 commit into
dnic-dev:mainfrom
MarcusSchoelzel:fix/transformation-serialization-500
Open

fix: return a clear error when a transformation read 500s#17
MarcusSchoelzel wants to merge 1 commit into
dnic-dev:mainfrom
MarcusSchoelzel:fix/transformation-serialization-500

Conversation

@MarcusSchoelzel

Copy link
Copy Markdown

⚠️ AI-generated — requires expert human review before merging.
This issue surfaced during automated AI testing against a real SAP BW/4HANA system — BW/4HANA 2023 (DW4CORE 400 SP07, SAP_BASIS 758 SP04) — driven through a BW Modeling Tools user. The problem analysis and the code fix were produced entirely by AI — GitHub Copilot (Claude Opus 4.8) — with no human review. The SAP-side behavior claims are the AI's findings, not verified against SAP documentation or Notes. Please have someone with deep SAP BW internals knowledge validate both the diagnosis and the fix before merging.

GET /sap/bw/modeling/trfn/{name}/m returns HTTP 500 "BW Model serialization failed" (CL_RSO_RES_TRFN → get_xml_from_db) for transformations the modeling serializer cannot represent — typically ones with start/end/expert ABAP routines or legacy rule types. This appears to be a permanent SAP modeling limitation (Eclipse BWMT shows the same on such transformations), not a transient error. bwGetTransformation() surfaced the raw 500 plus the full XML body.

Fix: catch the "serialization failed" 500 and throw a concise, actionable error pointing to SAP GUI (RSTRAN). Any other error is re-thrown unchanged.

Reviewer note: please confirm the "permanent SAP limitation" characterization — it's the AI's inference from observed behavior, not from an SAP Note.

Testing: npm run build passes.

GET /sap/bw/modeling/trfn/{name}/m returns HTTP 500 "BW Model
serialization failed" (CL_RSO_RES_TRFN -> get_xml_from_db) for
transformations the modeling serializer cannot represent — typically ones
with start/end/expert ABAP routines or legacy rule types. This is a
permanent SAP modeling limitation (Eclipse BWMT shows the same), not a
transient error. bwGetTransformation() surfaced the raw 500 plus the XML
body verbatim.

Catch the serialization 500 and throw a concise, actionable error that
points to SAP GUI (RSTRAN). Any other error is re-thrown unchanged.

Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
@dnic-dev

Copy link
Copy Markdown
Owner

Thanks for the PR! I'll verify this with a transformation that has ABAP routines in our dev system before merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants