emre / dpoll.xyz

Decentralized poll app on the top HIVE blockchain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Creating a poll with lengthy answer encounters 500 response

tdreid opened this issue · comments

Expected behavior

  • A user is able to create a poll with one or more lengthy answers
  • If there is a limit to the length of answers and a new poll exceeds it:
    • The user is informed and the attempt fails gracefully
    • Ideally the length of the answer is validated client side and the user may be informed before attempting to submit

Actual behavior

  • If a poll is created with at least one very long answer a partially broken poll is created:
    • The user encounters a 500 response upon submitting the poll
    • The user encounters a 500 response if attempting to edit the poll
    • The poll may appear to the creating user on dpoll.xyz, but not on Steemit, steemd, etc.
    • On dpoll.xyz any shorter answers will be listed on the poll, but the lengthy answer will not appear

How to reproduce

  1. Create a new poll.
  2. Add Question and Description.
  3. Add some brief answers (e.g. Yes, No, Maybe)
  4. Add a lengthy answer option. (e.g. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a molestie lectus, vel scelerisque velit. Nunc ultricies, turpis in ullamcorper lobortis, augue mauris viverra velit, vitae rhoncus metus nisl vel purus. In non auctor lacus, eget finibus orci. Donec a viverra dui. Nunc nec neque lectus. Praesent in ipsum at.)
  5. Submit the poll

Good catch.

I need to reproduce the issue to see the logs what causes it. We need also a transactional approach in case the broadcasting to the STEEM blockchain fails.