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

Wrong actionType in POST /v2/op/update causes wrong error message generated by PEP #378

Open
fgalan opened this issue Apr 27, 2018 · 0 comments

Comments

@fgalan
Copy link
Member

fgalan commented Apr 27, 2018

Testing with Postman, the following request (wrong actionType) to CB directlty (without PEP)

POST /v2/op/update

{
	"actionType": "APPPEND",
	"entities": [
		{
			"id": "myEntity1",
			"type": "myType",
			"description": {
				"value": "My happy entity",
				"type": "Text"
			}
		}
	]
}

result in

400 Bad Request
Connection: Keep-Alive
Content-Length: 129
Content-Type: application/json
Date: Fri, 27 Apr 2018 14:08:37 GMT
Fiware-Correlator: 7aa8c866-4a24-11e8-a2c6-000c29173617

{
    "error": "BadRequest",
    "description": "invalid update action type: right ones are: APPEND, APPEND_STRICT, DELETE, REPLACE, UPDATE"
}

However, if the same request is done throguh PEP we get:

{
    "name": "UNEXPECTED_CONTENT_TYPE",
    "message": "The MIME content type received is not supported: undefined"
}

which obsivously is not correct.

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

No branches or pull requests

1 participant