return 400 bad request when no resource found