Assuming you can link the source code for the API's logic - that should work. Mileage may vary depending on exactly how vague the message are. For example if a single error message could mean 10 disjointed things, might not be able to exhaustively list them.