public function actionStageTwoCredentials(?int $userId): array
	{
		$request = \Yii::$app->request;
		if (!$request->isPost)
		{
			throw new YiiBadRequestHttpException('Only POST requests are allowed.');
		}
		
		//\Yii::error("Request Post: " . json_encode($request->post()), __METHOD__);
		
		$model = new SignupStageTwoForm($userId);
		if (!($model->load($request->bodyParams, '') && $model->validate()))
		{
			return [
				'success' => false,
				'message' => 'Some information you entered is invalid or missing. Please review and try again.',
				'errors'  => $model->getErrors(),
			];
		}
		
		// $model->process() @returns User $user|false bool
		$user = $model->process();
		if (!$user)
		{
			return [
				'success' => false,
				'message' => 'Failed to save user credentials',
				'errors'  => $model->getErrors(),
			];
		}
		
		return [
			'success' => true,
			'data' => [
				'userId' => $user->id,
				'signup_phase' => $user->signup_phase,
			],
		];
	}
	
	class SignupStageTwoForm extends Model
{
	public string $fullname;
	public string $password;
	public string $passwordRepeat;
	
	// @var ParamHelper to class property.
	private int $_userNameMaxLength;
	private int $_userPasswordMinLength;
	private int $_userPasswordMaxLength;
	
	// @var app\models\User
	private ?User $_user = null;
	
	public function __construct(int $userId = null, array $config = [])
	{
		if ($userId === null)
		{
			throw new InvalidArgumentException(\Yii::t('app', 'User ID cannot be null.'));
		}
		
		$this->_user = User::findIdentitySignupWithPhase($userId, User::SIGNUPPHASE_EMAIL_VERIFIED);
		if (!$this->_user)
		{
			throw new InvalidArgumentException(\Yii::t('app', 'Unable to find account.'));
		}
		
		// @var ParamHelper to class property.
		$this->_userNameMaxLength = ParamHelper::get('user.nameMaxLength');
		$this->_userPasswordMinLength = ParamHelper::get('user.passwordMinLength');
		$this->_userPasswordMaxLength = ParamHelper::get('user.passwordMaxLength');
		
		/**
		* Call to parent constructor
		* The parent constructor should be called last to ensure proper object 
		* initialization and handling of configuration settings.
		*/
		parent::__construct($config);
	}
	
	public function rules(): array
	{
		return [
			[['password', 'passwordRepeat'], 'required'],
			
			['fullname', 'string', 'min' => 1, 'max' => $this->_userNameMaxLength],
			// Accept letters with some special characters.
			['fullname', 'match', 'pattern' => '/^[\p{L} .\'-]+$/u', 
				'message' => \Yii::t('app', 'Names can only contain letters, spaces, and certain characters.'),
				'skipOnEmpty' => true,// Important: skip validation if fullName is empty
			],
			
			['password', 'string', 'min' => $this->_userPasswordMinLength, 'max' => $this->_userPasswordMaxLength],
			['passwordRepeat', 'compare', 'compareAttribute' => 'password', 'message' => 'Passwords do not match.'],
		];
	}
	
	/**
	* Process verification
	* @return User|false
	*/
	public function process(): User|false
	{
		if (!$this->validate())
		{
			return false;
		}
		
		$user = $this->_user;
		if (!$user)
		{
			return false;
		}
		
		try
		{
			$user = $this->_user;
			$user->fullname = $this->fullname ?: null;
			$user->setPassword($this->password);
			$user->status = User::STATUS_ACTIVE;
			$user->advanceSignupPhase();// Set signup_phase to the next stage/step...
			
			if (!$user->save(false))
			{
				throw new YiiDbException('Failed to save user data to the database.');
			}
			
			return $user;
		}
		catch (\Throwable $e)
		{
			// Use the ExceptionLogger to handle and log the exception.
			ExceptionLogger::log($e, 'signup_stageTwo_form_error_');
		}
		
		return false;
	}
}

What can i do to make the return error more useful, right now im getting the error:

name	"Exception"
message	"Unable to find account."
code	0
type	"yii\\base\\InvalidArgumentException"
file	"/app/models/forms/SignupStageTwoForm.php"
line	40

within the frontend the user will see: error is null

Which is not helpful at all. need to return something anything "something went wrong, please try again later" or I need a better way to handle the construct?