Retrieving response body from Skuid rest model

I have a rest model that I’m updating and I can’t seem to find a way to access the response body. I’m returning an error message that I would like to have displayed on the page in the body. Does anyone know how I can access the response body?

Would you mind providing a picture of the error and providing some more detail into what your set up is?

I have a rest model that calls into an API. When I update the model, it makes a call to the API and some validation takes place there. If validation does fail, the API returns a 400 Bad Request along with some error messages in the body of the response. When I view the list of errors that are on the result object after the save, the error says “Bad request” which looks like the status code. What I would like is to get the error messages from the response body, which I haven’t been able to find. I hope that clarifies it some.

Wun,

It looks like Skuid has an API call to get the error message->  skuid.ajax.getErrorMessage

Maybe add a snippet that runs on model load to get the output of this call?

Thanks,

Bill

Bill, can you elaborate more on this? Maybe provide an example. I don’t see the method getErrorMessage from Chrome’s Developer’s Tools. Also, looking at Skuid’s documentation on skuid.ajax, I don’t see anything documented about this method either.

https://docs.skuid.com/latest/en/skuid/api/skuid_ajax.html

Wun,

I actually looked at the Developer Console in Chrome to find that API call. If you open the console, type ‘skuid’. You can then drill into the different methods.

The other thing to look at is this posting: https://community.skuid.com/t/how-does-skuid-handle-session-timeout-when-using-table-filt…

I think you can use this sample to get the error message from Salesforce.

Thanks,

Bill

!(https://us.v-cdn.net/6032350/uploads/attachments/RackMultipart20170322-118678-1m7387q-2017-03-22_16_26_28-https _skuid.na54.visual.force.com_apex_skuid ui_page_VFT_Contacts_inline.png “Image https//d2r1vs3d9006apcloudfrontnet/s3_images/1571301/RackMultipart20170322-118678-1m7387q-2017-03-22_16_26_28-https___skuidna54visualforcecom_apex_skuid__ui_page_VFT_Contacts_inlinepng1490214528”)