In reply to gariks:
Without being able to run your code, it’s difficult to determine what your exact issue is.
One thing that may be an issue is that you randomize your response without constraining your response type. This may result in the response being a READ for a WRITE request, although I’m not sure that would cause any issue.
Can you put your example on EDAPlayground so we can see exactly what is happening?