Making AJAX call from within a service

Hi All,

To provide some context, I've been attempting to make an AJAX (GET) call from within a service.
While the call is successful when made without relying on the service (such as via a button trigger), it fails when made through the service.

Below is the code segment I've used for invoking the service;

function activateBackgroundService(accessToken, serverEndpoint) {
    	var subscribeStatus = true;
        var resubscribeStatus = true;
        var request = webOS.service.request("luna://", {
            parameters: {  
            onSuccess: function(inResponse) {  
            onFailure: function(inError) {  
            	console.log("Fail " + inError.errorText);  
            onComplete: function(inResponse) {  
            subscribe: subscribeStatus,
            resubscribe: resubscribeStatus

Here is the code I've used to register the service;

service.register("operation", function(message) {
	var counter = 0
	setInterval(operationRequest, 10000)
	function operationRequest() {
		console.log("In hello callback");
            type: "GET",
            url: message.payload.endpoint + "/api/device-mgt/v1.0/device/agent/pending/operations/webOS/18",
            headers: {
            	'Authorization': 'Bearer ' +  message.payload.msg,
                'Content-Type': 'application/json'
            success: function (resp) {
        			returnValue: true,
        			message: resp
            error: function (xhr) {
        			returnValue: false,
        			message: "Fail" + JSON.parse(xhr)

Through testing, I've figured out that the parameters are passed properly, the service gets initiated as intended and as mentioned earlier; the AJAX call is also successful.

However, what keeps happening is that failure state in the service invocation is triggered and a quick debug shows that the errorText proclaims "Message status unknown."

Would appreciate some suggestions on how to fix this.