It depends, Kathy. While the locust (Ceratonia siliqua) is not currently known to be toxic, black locust (Robinia pseudoacacia) contains substances known as toxalbumins, which can be toxic to animals and humans alike.
The bark, leaves and seeds of black locust all contain the toxalbumins robin, phasin and robitin, which can produce severe gastrointestinal irritation, weakness, blood cell, liver and kidney damageand in some cases, even death. Typically, the most severe cases are seen in large animals (cattle, horses) who graze on pods or foliage, but there is certainly potential for serious signs to occur in small animals, such as dogs, too. Based on this information, we recommend keeping this plant material well out of the reach of pets.