Set status for endpoints when an error occours like #697