Since it’s a JSONDecodeError, it looks to me that while $resp is indeed a Response instance (since it has a json() method that can be called on it), decoding fails because there’s nothing to decode; the Response.text is most likely empty.
Try setting a breakpoint and taking a look at $resp or log the $resp.text.