1

I've created a public site with a RESTful service mentioned in this blog, however this site uses Guest User License and I can't see any debug statements when this webservice is used by Postman.

Is this intended or am I missing something? Is there way to track the callouts made without using a custom object for logging?

Any help is greatly appreciated.

@HttpPost
global static String doPost() {
    RestRequest req = RestContext.request;
    Blob body = req.requestBody;
    String requestString = body.toString();

    BO_LeadFormWebservice wrapper = (BO_LeadFormWebservice) JSON.deserialize(requestString, BO_LeadFormWebservice.class);
    System.debug('incoming payload');
    System.debug(wrapper);

    String result;

    if(wrapper.google_key != null){
        result = wrapper.google_key;
    }

    return result;
}
Atlas Can
  • 1,877
  • 3
  • 11
  • 26

2 Answers2

3

For anyone looking at this in the future, this post has solved my issue: StackExchange Post. You need to set your site name as your as the user name and it will show up in debug logs (without setting a cookie).

Atlas Can
  • 1,877
  • 3
  • 11
  • 26
  • 1
    Every force.com site has a guest user which needs to be selected for the debug logs. set your site name as your as the user name: this statement is confusing. – Raul Dec 25 '19 at 14:58
1

No debug logs available for guest user since Winter 17 as the latest answer to this question explains. So, your best shot is a try/catch + custom log.-

Ideasforce
  • 1,187
  • 2
  • 7
  • 17