newslynx / opportunities

A garden of NewsLynx futures
1 stars 0 forks source link

Requested URL error returns the requested URL #155

Closed mhkeller closed 8 years ago

mhkeller commented 8 years ago

Could the 404 message return the URL that was requested? It would help in a great deal in debugging

abelsonlive commented 8 years ago

404's are handled by flask. Not sure how to override it's error messages. What is the difference between the API returning the URL requested and logging the URL that you are requesting?

mhkeller commented 8 years ago

The benefit would be people getting a 404 could paste the result of their console output to help quickly trace what the problem with the request was instead of logging into the server and matching up the timestamps.

abelsonlive commented 8 years ago

That seems like a problem with the app's logging and not the api's error message. if the api returns a 404, then the app has made a mistake. perhaps you should catch errors and log the request to the console.

mhkeller commented 8 years ago

will all errors and only errors return an object with at status field? I currently log errors but this format comes back as an ok request.

abelsonlive commented 8 years ago

is it not coming back with a status_code of 404?

abelsonlive commented 8 years ago

going to close this for now.