Return initial step for non-existent host records instead of throwing an error
This commit is contained in:
@@ -53,7 +53,9 @@ export class HostService {
|
||||
});
|
||||
|
||||
if (!host) {
|
||||
throw new ApiError(404, 'Host record not found.');
|
||||
// If host record doesn't exist yet, return stepper 1 (NOT_SUBMITTED)
|
||||
// so callers (like the stepper endpoint) can show initial step.
|
||||
return { stepper: STEPPER.NOT_SUBMITTED } as any;
|
||||
}
|
||||
|
||||
return host;
|
||||
|
||||
Reference in New Issue
Block a user