rest: return 404 on not found instead of 400

Change-Id: Ice653ed83fdd5a0ceb4e6d1b909ddb0338e1ca51
Merge "rest: return 404 on not found instead of 400"