But what macOS doesn't have is an API for an application to query whether it has 'local network' access or not. If it did, Firefox could report a proper error message.
Safari of course get 'local network' access automatically, with no permission asked of the user. Special treatment for Apple's own apps of course.