Think of your bass playing job as making someone a meal… you've got your basic stuff like bread, potatoes, pasta that makes up a good proportion of it… boring and a bit bland on their own, but they do the job to fill you up… the bass equivalent would be ROOT notes played below the 5th fret position (d'you see where I'm going with this?

)
As you move further away from the harmonic foundation of the chord, your bass notes become less like potatoes, and more like garlic and chilli peppers

some of the most dissonant notes you could choose MAY work well under certain circumstances, but should almost always be used sparingly and appropriately…
The harmonic foundation of a chord is the root… the fifth establishes the root as the tonal centre and the 3rd establishes the basic character of the chord, major or minor - this is why many many bass lines are based on root-3rd-5th-octave ideas.. because they provide a solid harmonic foundation - one of the fundamental functions of the bass
As the chord is extended, in the sequence 7,9,11,13… the notes have a less and less strong harmonic relationship between the chord foundation, so tend to make less and less harmonic 'sense' when taken in isolation - this doesn't mean they can't sound great, just that they function differently to roots & 5ths
Another thing to remember is that the rhythm on your line has a dramatic effect on the effectiveness of your note choice… depending on its place in the rhythm, its volume, duration etc, the difference between a note sounding good or bad… for example, the chromatic notes you referred to.. A chromatic run up or down landing on a root or a 5th on a strong beat can sound great… for example a very common run up to a root is to go
b7-maj7-root e.g. in a D minor chord vamp, you'd go C - C# - D
That C# works great as a slinky passing tone on an offbeat, connecting C and D as a passing tone... but would sound horrendous as a strong note on the first beat of a chord of D minor… so, context is everything
One way of incorporating all this into your playing (for most kinds of music) is to think of the chord's root note as 'home', and aim to land on it enough times, in the right places to establish it as the tonal centre… once that basic job's done, you can fill in the gaps with whatever you like, according to your taste… you'll surprise yourself with how many 'wrong' notes you can use…
in some ways, you don't have to think 'does this note work or not?' because your ears will do the job for you.. there's a lot to be said for just wiggling your fingers, listening to what comes out and making a judgement on whether it works solely based on what you're hearing