Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG - batch requests of content type application/json not working #910

Open
1 of 3 tasks
jonasdutzisap opened this issue Feb 5, 2025 · 1 comment · May be fixed by #912
Open
1 of 3 tasks

BUG - batch requests of content type application/json not working #910

jonasdutzisap opened this issue Feb 5, 2025 · 1 comment · May be fixed by #912

Comments

@jonasdutzisap
Copy link

Description

Hi team,

in our application we have some custom coding which sends an odata batch request of content type application/json. This is how the request looks like:

Image

Unfortunately the mock server seems to not be able to process this batch request correctly and throws an error in batchParser.js when parsing the request:

ERR! server:ux-fe-mockserver TypeError: input.indexOf is not a function

Image Image

I assume this is a bug in the mockserver or a not supported feature.
Could you please let me know how to solve this?
We are using the latest version "@sap-ux/ui5-middleware-fe-mockserver": "^2.2.87"

Thanks in advance! :)

Expected results

It should parse the batch request and return the data for the 3 mocked endpoints

Actual results

The error shown above is thrown

Version/Components/Environment

Add any other context about the problem here
OS:

  • Mac OS
  • Windows
  • Other

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}

@nlunets
Copy link
Member

nlunets commented Feb 5, 2025

This looks like json batch ?
Can you send the full request detail (har file works), but overall we don't support json batch so we would need to look into whether it make sense or not :)

@nlunets nlunets linked a pull request Feb 6, 2025 that will close this issue
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 a pull request may close this issue.

2 participants