proper error handling for not found resources