I have mocked my API-Respones with fetchMock (v.5.13.1). I have been working with it for a quite long time now and I didn't see this kind of behaviour yet.
I mocked two GET responses that are very similar.
fetchMock.get('glob:*/shippings/',"results":[
{"id": "1234", "status": "RELEASED", "foo": "bar"},
{"id": "5678", "status": "CREATED", "foo": "bar"},)
fetchMock.get('glob:*/shipping/myId1234',
{"id": "1234", "status": "RELEASED", "foo": "bar"})
Now, the first one works properly, but the second get returns me this error message:
fetch-mock.js:187 Uncaught TypeError: Invalid status RELEASED passed on response object. To respond with a JSON object that has status as a property assign the object to body e.g. {"body": {"status: "registered"}}
I have an assumption, that I cant mock some response that contains a status, because thats in a way a reserved attribute for status codes, but I am not quite sure and I cant find any similar errors online.