I was reading that in retaliation for the Norwegian attempts to curb their behavior in Bergen, the Hanseatic League stopped all grain shipments to the kingdom. Even going so far as to send out pirates/ privateers to prevent other merchants from selling grain to the starving people.
Some background: What became the Hanseatic League established themselves in Bergen in the 1240s, and remained till the 1750s. This is a very long time.
Bergen was the League's northernmost port, a source for fish and pelts. The demand was mainly for grain from the Baltics, but also crafts and luxuries. The grain supplies were extremely important after the black plague. The League formalized in the 1360, and after a century and a half, Bergen became the largest medieval town in Scandinavia, thanks in part to the trade. Bergen remained the largest town in Norway umtil the 1820s.
However, Bergen stopped being a capital in 1299, was ruled by Copenhagen from 1380, followed by Stockholm in 1814.
Edit: The Hanseatic museum has a lot of information on their website https://hanseatiskemuseum.museumvest.no/norsk/hvem-var-hanseatene/ (Norwegian).