title: Get requestparam from after model mapping api objects to entity objects
body: <p>So I have used modelMapper to map model objects to entity objects and vice versa. I am trying to get a requestparam which is giving me hard time and I would appreciate some help.</p>
  <p>This is the error I am getting:</p>
  <p>Hibernate: select c1_0.id, c1_0.email, c1_0.first_name, c1_0.idp_customer_id,
  c1_0.last_name, c1_0.phone from customer_entity as c1_0 where c1_0.idp_customer_id = ?
  2022-08-04 22:41:10 [http-nio-8040-exec-4] ERROR - [dispatcherServlet]:175: Servlet.service() for servlet [dispatcherServlet] in context with path [/ca] threw exception [Request processing failed; nested exception is java.lang.IllegalArgumentException: source cannot be null] with root cause
  java.lang.IllegalArgumentException: source cannot be null</p>
  <p>This is my controller:</p>
  <pre><code> /** GET request to return customer Id_id **/
      @RequestMapping( method = RequestMethod.GET)
      @ResponseBody
      public Customer getCustomerIdpId(@RequestParam(name = &quot;idp_customer_id&quot;) String idpCustomerId) {
              return customerMapper.convertToCustomer(customerAccountService.getCustomerIdp(idpCustomerId));
      }
  </code></pre>
  <p>And this is my CustomerMapper:</p>
  <pre><code> public Customer convertToCustomer(CustomerEntity customerEntity) {
      return  modelMapper.map(customerEntity, Customer.class);
  
  }
  </code></pre>
  <p>my request body:</p>
  <pre><code>{
  &quot;idpCustomerId&quot;: &quot;3940f85e-4601-4870-b30f-c6624e7d4678&quot;,}
  </code></pre>
  <p>Thank you.</p>