check sys_query_history
to find the session_id of the call to the proc, then pull all rows with that session id sorted by start_time desc. The last one is the one throwing the error. Also redshift is case sensitive and Postgres isn’t so be careful it’s not a straight port.