Currently, in the DataSourceByID class, the following code occurs when a data source is not found:
return {"message": "Data source not found."}, 404
404 is a status code typically use to indicate that a page on a web domain is not found -- not that a search does not pull the correct result. When I tested the GET method and got this result, I initially thought I'd done something wrong with my endpoint, and probably others would think this as well.
Recommend replacing this status code with something else -- possibly just 200, because it's not unexpected behavior if we can't find a data source using the GET method -- it may not exist in our database.
Currently, in the
DataSourceByID
class, the following code occurs when a data source is not found:404 is a status code typically use to indicate that a page on a web domain is not found -- not that a search does not pull the correct result. When I tested the GET method and got this result, I initially thought I'd done something wrong with my endpoint, and probably others would think this as well.
Recommend replacing this status code with something else -- possibly just 200, because it's not unexpected behavior if we can't find a data source using the GET method -- it may not exist in our database.