add status code when server failed to add measure to db

Change-Id: I653f1ba2d28054a62cfb65fb715076577ae2449c