SAP / open-ux-odata

Enable community collaboration to jointly promote and facilitate best in class framework and tooling capabilities when working with OData services.
Apache License 2.0
51 stars 12 forks source link

BUG - Odata v2 eeponse returned by ui5-middleware-fe-mockserver cause URIError #680

Closed LombardsAI closed 1 year ago

LombardsAI commented 1 year ago

Description

When the key of a request instance contains "%", the response returned by ui5-middleware-fe-mockserver will be something like:

{
                "name": "%(m)",
                "descr": "Percent mass",
                "code": "M%",
                "__metadata": {
                    "id": "/odata/v2/PropertyConfigureService/UnitOfMeasure('M%')",
                    "uri": "/odata/v2/PropertyConfigureService/UnitOfMeasure('M%')",
                    "type": "PropertyConfigureService.UnitOfMeasure"
                }
            }

in which the _metadata part will cause a URIError because of ('M%'), please see the screenshot below: image

As a reference, the response in our Dev environment will be something like:

"__metadata": {
                    "id": "https://epd-acc-eu20-consumer.specification-management.eu20.acc.epd.dev.sap:443/odata/v2/PropertyConfigureService/UnitOfMeasure('M%25')",
                    "uri": "https://epd-acc-eu20-consumer.specification-management.eu20.acc.epd.dev.sap:443/odata/v2/PropertyConfigureService/UnitOfMeasure('M%25')",
                    "type": "PropertyConfigureService.UnitOfMeasure"
                }

Version/Components/Environment

This issue happened when we want to upgrade @sap-ux/ui5-middleware-fe-mockserver from 2.1.98 to 2.1.115

Root Cause Analysis

Problem

{describe the problem}

Fix

{describe the fix}

Why was it missed

{Some explanation why this issue might have been missed during normal development/testing cycle}

How can we avoid this

{if we donโ€™t want to see this type of issues anymore what we should do to prevent}

metzing commented 1 year ago

Hello Colleagues,

This issue is blocking us from keeping up-to-date with the @sap-ux/ui5-middleware-fe-mockserver package.

Can we have a reply here please? Do you need any additional information?

Thanks, Marton

nlunets commented 1 year ago

Should be fixed with [@sap-ux/ui5-middleware-fe-mockserver@2.1.120]

metzing commented 1 year ago

Thanks, checking

metzing commented 1 year ago

Original issue seems to be resolved, but now we have another test failing with the upgrade ๐Ÿ˜… Thanks for the assistance here, I'll investigate and open a new issue if applicable.

metzing commented 1 year ago

Thanks, the fix is confirmed