Sometimes we want to return additional payload as JSON to error but at the moment we can not.
Basically we should allow saying: throw new UserInputError({ message: 'some error', payload: { foo: 'bar' })
is equivalent to throw new Error({ code: '#user_input_error, message: 'some error', payload: { foo: 'bar' })
Sometimes we want to return additional payload as JSON to error but at the moment we can not.
Basically we should allow saying:
throw new UserInputError({ message: 'some error', payload: { foo: 'bar' })is equivalent to
throw new Error({ code: '#user_input_error, message: 'some error', payload: { foo: 'bar' })