API does not return the right error

Hey. I was wondering if there is any way to get the errors that are into the logs as an api response. For example, i have been trying to create a source but the database that i’m using does not exist as the following log shows

But the api does not return this error, it just returns "Failure while configuring source " which is not clear at all