Contents

OnError - Non-REST

For the OnError Handler See REST Web Services - Generating and Working with Error Responses.

  throw CreateException( - 1, - 1, "you had an error mate!");
HTTP/1.1 200
status: 200
date: Sun, 29 Oct 2017 21:49:31 GMT
content-length: 373
content-type: text/xml; charset=UTF-8
transactionid: 0b74c7c1-bcf3-11e7-bc2c-e2a44ed419c0

<?xml version="1.0"?>
<IBResponse type="error">
  <DefaultTitle>Integration Broker Response</DefaultTitle>
  <StatusCode>20</StatusCode>
  <MessageSet>158</MessageSet>
  <MessageID>10001</MessageID>
  <DefaultMessage>you had an error mate! (-1,-1) CHG_IB_UTEST.syncUTest.OnExecute Name:onRequest PCPC:960 Statement:16</DefaultMessage>
  <MessageParameters></MessageParameters>
</IBResponse>

OnError - REST

   %This.OnErrorHttpResponseCode = 404;
   throw CreateException( - 1, - 1, "you had an error mate!");

REST based Service Only


OnError Functionality
The Response Code and Content Type will be automatically set based
on the value defined for the Fault Message on the Service Operation Defintion.
These can be overrides by setting the property OnErrorHttpResponseCode and/or
the property OnErrorContentType
*/

interface IRequestHandler
   method OnRequest(&message As Message) Returns Message;
   method OnError(&request As Message) Returns string;
   property integer OnErrorHttpResponseCode;
   property string OnErrorContentType;
end-interface;

Author Info
Chris Malek

Chris Malek is a PeopleTools® Technical Consultant with over two decades of experience working on PeopleSoft enterprise software projects. He is available for consulting engagements.

Work with Chris
PeopleSoft REST APIs in Minutes, Not Months
PeopleSoft Simple Web Services (SWS)

SWS turns SQL into production REST APIs — ready for AI, modern apps, and partner integrations. One install, unlimited potential.

  • Configuration-driven, no coding required
  • JSON, XML, and CSV output
  • Works across all PeopleSoft pillars
  • Built on 25+ years of PeopleSoft expertise
Looking for pain-free PeopleSoft web services?
PeopleSoft Simple Web Services (SWS)

A powerful PeopleSoft bolt-on that makes REST web services easy. You bring the SQL, SWS handles the rest.

  • Go from idea to production in minutes
  • Zero code migrations after install
  • JSON, XML, and CSV output supported
  • No PeopleCode or Integration Broker expertise required
Stop Building PeopleSoft Web Services the Hard Way
PeopleSoft Simple Web Services (SWS)

Traditional PeopleSoft web services cost $3,600–$13,000 each to develop. SWS deploys production REST APIs in under 5 minutes through configuration alone.

  • No PeopleCode or Integration Broker expertise required
  • Works across Campus Solutions, HCM, and Financials
  • Built-in pagination, caching, and nested data structures
  • Trusted by institutions across higher education and government
PeopleSoft REST APIs for AI, Modern Apps, and Integrations
PeopleSoft Simple Web Services (SWS)

Turn PeopleSoft data into clean REST APIs for AI integrations, modern applications, and vendor data feeds. Configuration-driven — no PeopleCode required.

  • Deploy production APIs in under 5 minutes
  • AI and LLM ready (RAG, chatbots, intelligent search)
  • JSON, XML, and CSV output
  • Zero modifications to delivered PeopleSoft objects