Why getting get_session error when using put_session?

It makes more sense to copy the full error text into your topic - as it is most of the pertinent information is missing from the image you linked to.

The only useful bit of information is

no function clause matching in Plug.Conn.get_session/1

I suspect that it fails here:
https://github.com/elixir-plug/plug/blob/v1.8.2/lib/plug/conn.ex#L1590-L1597

which suggests that the conn argument you pass isn’t actually a %Plug.Conn{} struct (though it would seem odd that it gets passed conn.private).

Though additional error information may give some more insight.

From the limited information on the screenshot I’m not necessarily convinced that the error originates from the code you show (again the relevant error information is missing) - given how IO works, position of errors relative to IO.puts output isn’t necessarily a reliable indicator of the actual location of where the error occurs.


Unrelated - put_session/3:

The key can be a string or an atom, where atoms are automatically converted to strings.

So "share_job_opening_description" as a key would be clearer than :share_job_opening_description (which is converted to the string anyway).