I’m using Auth0 Laravel SDK, and trying to create a new user with Management API.
try {
Auth0::management()
->users()
->create(
connection: 'Username-Password-Authentication',
body: [ params ]
);
} catch (\Exception $e) {
// I want here to be executed if errors occur.
}
If the user has already exited, I expect the catch block to be executed.
However, it is not.
I can check the errors in Monitoring > Logs section.
How can I use the error messages (e.g., “The user already exists.”) in the catch block?
Is it possible?