The small snippet you posted shows you ignoring the error returns. Don’t do that - anywhere. That might show you what’s going on. If not, post your real code and we might be able to assist.
Also, “not getting posted” indicates you are looking at this from the server side as well? If so, check for errors there as well, etc.