telefonicaid / fiware-pep-steelskin

Telefonica's implementation of the FIWARE PEP GE
GNU Affero General Public License v3.0
0 stars 0 forks source link

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

Open fgalan opened 6 years ago

fgalan commented 6 years ago

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.