tags:

views:

33

answers:

1

Say I have resource defined as /thing/{id}/ and my id is a int in the database ...

What makes most sense in dealing with requests that ask for a resource which ins't an int like /thing/abc/ ?

Should I do nothing and possibly let the server return 500?

or catch the exception and return 404?

or some other http error?

or am I missing a bigger picture here?

Thanks.

+6  A: 

If the page /thing/abc/ doesn't exist, you should return 404.

Lukáš Lalinský