Hello @Data Engineer
You can pass a variable to a stored procedure by clicking New under the Stored Procedure Parameter option of the stored procedure activity, there you can pass variable name, it's data type and value
In your case, the value should be the error message of the activity you are using
For ex, if you are using a Copy activity with name Copy_Data then your value would be
@activity('CopyData').output.errors[0].Message