Skip to Content
Technical Articles
Author's profile photo Milton Chandradas

How to debug service layer, custom handlers – Cloud Application Programming Model

Github repository:

To be published soon…



  • In this session, we will look at how to debug the service layer by accessing the _req object
  • Also, we will look at how we can add more complex custom handlers



  • The generic handlers serve most CRUD operations out-of-the-box
  • But to add custom logic, we have to provide our own custom handlers
  • Also, while developing complex custom handlers, we need a way to be able to debug and set breakpoints to access the values of variables at different lines



  • In this example, we will explore the contents of the _req object in our custom handler
  • To understand the _req object, we will take an example where the end user needs to provide the password in a custom header in order to access a protected resource
  • We will set debug points in our code to look into the structure of the _req object and how we can access the custom header information
  • Then we will also add more custom code to compare the encrypted password with the password supplied by the user before returning the protected resource


YouTube link:



  • This video should give you a clear idea on how to implement complex custom handlers in Cloud Application Programming Model
  • Also, the _req object is quite important when it comes to middleware functions.  You should now be comfortable with accessing, modifying the _req object to suit your needs
  • If you have any questions or comments, please list them below and I will be happy to answer


Next post:


Previous post:

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.