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] error and description are missing in some errors with attr update - PUT/v2/entities/<id>/attrs/<attr_name> #1360

Closed
iariasleon opened this issue Oct 14, 2015 · 2 comments
Assignees
Milestone

Comments

@iariasleon
Copy link
Contributor

With the attribute update request - PUT/v2/entities//attrs/<attr_name> . Some errors do not show the error field and the description field.

If entity does not exists

Request:
          PUT http://<host>:<port>/v2/entities/xcvxcvxc/attrs/timestamp
           Fiware-Service: happy_path
           Fiware-ServicePath: /test
           Content-Type: application/json 
           {"value": 23}
Response:
         404 Not Found 
         Content-Length: 0 
Expected:
Status: 404 Not Found

{
    "error": "NoFound",
    "description": "No context element found"
}

If entity exists but attribute does not exists

Create Request:
          POST http://<host>:<port>/v2/entities
           Fiware-Service: happy_path
           Fiware-ServicePath: /test
           Content-Type: application/json 
           {"id": "room_2", "temperature","value": 47}
Update Request:
          PUT http://<host>:<port>/v2/entities/room_2/attrs/dfgdfgdf
           Fiware-Service: happy_path
           Fiware-ServicePath: /test
           Content-Type: application/json 
           {"value": 23}
Response:
         472 Unknown 
         Content-Length: 0 
Expected:
Status: 404 Not Found

{
    "error": "NoFound",
    "description": "No context element found"
}
@fgalan
Copy link
Member

fgalan commented Jun 17, 2016

According to PR #2298 (which contains a .test) this issues seems to be fixed. Please @iariasleon have a look and close in that case.

@fgalan fgalan added this to the 1.3.0 milestone Jun 17, 2016
@iariasleon
Copy link
Contributor Author

LGTM

http code: 404 - Not Found
headers:
   date: Fri, 17 Jun 2016 11:42:41 GMT
   fiware-correlator: 993c3012-3480-11e6-a18c-005056a20feb
   connection: Keep-Alive
   content-type: application/json
   content-length: 61
payload: {"error":"NotFound","description":"No context element found"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants