Search code examples
ibm-mobilefirstadapterworklight-adaptersworklight-server

How to handle Missing configuration property in adapter


how can handle the Missing configuration property in adapter?

in worklight.properties file i configured as below test.sw_vc_sAction=http://sadsdf./insdfsd.svc

i fetching in adapter using below way WL.Server.configuration["test.sw_vc_saction"];

Note : i know i did mistake instead of sAction iam using saction, but i want to handle error

i tried using 200 , 500 but unable to handle at server side itself


Solution

  • You cannot.

    The adapter is being compiled and is then run in the server's memory.
    This property is then used where ever you set it in the adapter code.

    You put the wrong value, so it's just not working. You cannot handle it with status codes (200, 500) because it's not related to network traffic.

    Make sure that you're using the correct property name.