What is the ruling of accepting invitations other than a Walima

Saaiduna Abdullah Ibn Umar narrates that the Prophet of Allah has said, “The person who is invited amongst you by his brother should accept the invitation whether it is a wedding invitation or anything similar to it.” (Sahih Muslim p.462 v.1)

Saaiduna Jabir Ibn Abdullah narrates that the Prophet of Allah said, “If anyone of you is invited to partake of meals, he should at least accept the invitation. Thereafter he may partake of it if he desires or he may totally abstain from it.” (Sahih Muslim p.462 v.1)

In the Hanafi Fiqh, accepting a walima invitation is a Sunnah Muakkadah whereas it is desirable and sunnah to accept other invitations.

Regarding your situation, it was not necessary for you to accept this invitation, therefore, you would not be considered sinful for failing to attend this invitation and going somewhere else.