A show() promise rejects with this when the answer couldn't be read.
Class in @minecraft/server-ui
Extends Error
A show() promise rejects with this when the answer couldn’t be read.
import { FormRejectError } from '@minecraft/server-ui';Example
Section titled “Example”import { FormRejectError } from '@minecraft/server-ui';
try { // Call the API here.} catch (error) { if (error instanceof FormRejectError) { console.warn(`${error.name}: ${error.message}`); } else { throw error; }}import { FormRejectError } from '@minecraft/server-ui';
try { // Call the API here.}catch (error) { if (error instanceof FormRejectError) { console.warn(`${error.name}: ${error.message}`); } else { throw error; }}Properties
Section titled “Properties”reason
Section titled “reason”read-only
readonly reason: FormRejectReason;Types