MYSQL DOCKER how to theck that sql script imported correctly

i use docker Mysql and directory /docker-entrypoint-initdb.d/ for a importing sql on a database startup.
What i need i need to check is sql script imported correctly
sometimes i have

but sometimes i can see some error (like below)

Tha main question how i can import status in CI/CD
THANKS FOR REPLY