Skip to content

Inconsistent errors and error messaging #3

@tripott

Description

@tripott
  • Attempting to Add the following to the /shoes endpoint produces a 500 internal server error but displays a 400 error message. Need a consistent and correct response and error message to help the developer troubleshoot their call to the api.

  • Adding a duplicate shoe provides a 400 No Data to Add error message and a 500 internal server error. 500 internal server errors are meant when an error occurred on the server. 400 series are for when the developer who is calling the api send bad data in the request (such as missing or in this case duplicate data.)

  • See Errors in http://nosql.how2js.com/API/

    {
    "_id:": "Hi",
    "name": "Adidas Super Boost",
    "description": "Triple Awesome Running Shoe",
    "inStock": true,
    "retailCost": "180.00",
    "dateAvailable": "11/11/2016",
    "type": "shoe"
    }
    
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions