The move is in response to a 2004 ruling by the International Court of Justice , which said Texas officials failed to notify the Mexicans of their right to talk to consular officials shortly after their arrests .