forked from sphinix27/notifier_api_test
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Description
In channels endpoint it is possible to filter channels by name like: '/channels?name=something&ignoreCase=FALSE'. It finds any channel with the exactly same name provided, if ignoreCase is set to true it will ignore the name is with uppercase or downcase. If you send the filter ignoreCase empty like: '/channels?name=something&ignoreCase=' it returns a 500 status code with a response saying is a Null Pointer Exception. This also happens when you send params like: '/channels?name=&ignoreCase='.
Environment
- An Notifier Server installed with version 1.0
- Operating System and version:
Windows Server 2012 R2
Requirements
- Rest Client: E.g. Postman.
- Any Channel already created:
API
- Method:
GET - Endpoint:
/api/channels?name=channel&ignoreCase=
Steps to Reproduce
- Open Postman.
- In Postman select 'GET' method for URL.
- In Postman Enter the endpoint to retrieve channels. E.g. 'http://128.0.0.1/api/channels?name=valid&ignoreCase='
- Click on Send button.
- Verify the response has a 400 status code.
- Verify the response is similar to:
{
"timestamp": 1507722938867,
"status": 400,
"error": "Bad Request",
"exception": "org.springframework.web.method.annotation.MethodArgumentTypeMismatchException",
"message": "Bad Request",
"path": "/channels"
}Actual Result
The status code is 500 and the response contains:
{
"timestamp": 1507724207772,
"status": 500,
"error": "Internal Server Error",
"exception": "java.lang.NullPointerException",
"message": "Request processing failed; nested exception is java.lang.NullPointerException",
"path": "/channels"
}
Expected Result
The status code should be 400 and the response contains a bad request.
Reactions are currently unavailable