Classic Universal Login - Custom Errors

Hello!

I am wondering if it is possible to create custom errors to forward along to the universal login screen from a custom database connection. I’m using the Classic login experience, and am aware there is a way to customize the messages for a given error, but I would like to create a whole separate error to return in a very specific case.

More specifically, I’d like to let the user know that they are trying to sign in using a username and password (custom DB connection), but they’ve already signed in before using a social provider (lets say GitHub). Currently, my system treats this as an “Incorrect Username or Password”, when really it should tell the user that they sign in with a social provider so they aren’t left to wonder why their password isn’t working (or worse, try to reset it). Is this possible to do, or do I just need to make my error messages super generic to catch cases like this?

Thanks!

Bumping this hoping to get a quick response (even if to tell me its not possible), thanks!