---
title: "Comment by Sasha Gomanuke on \"Saving Rich Text Content to the DB Via an Ajax Process in APEX\" | Hashnode"
description: "Hello, guys! Would You comment that mysterious part of code? // Something bad happened. error: function( In fact all application's SAVE_NOTE errors goes in sect"
url: "https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052/comment/68201dd91359b1472739e41b"
---

[Discussion](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052)

Comment [Saving Rich Text Content to the DB Via an Ajax Process in APEX](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052)

[Sasha Gomanuke](https://hashnode.com/@gomanuke)

[May 11, 2025](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052/comment/68201dd91359b1472739e41b)

Hello, guys! Would You comment that mysterious part of code?

// Something bad happened. error: function(

In fact all application's SAVE\_NOTE errors goes in section success: function(

But what case will use error: function( ? I just guess that it's useless part of code...

BTW global error handling function doesnt catch pl-sql exceptions from ajax calls ((

[Jon Dixon](https://hashnode.com/@orclapex)

[May 11, 2025](https://hashnode.com/posts/saving-rte-content-via-ajax/65e9b7026ccdef24ec711052/comment/68201dd91359b1472739e41b#reply-6820edce1904f9ccbede1622)

Hi, The comment "Something bad happened." is just a comment to signify that some exception occurred in this JavaScript. PL/SQL errors should be trapped in the Ajax call and are displayed by this piece of code `} else {           // Stop the Interval so we don't keep trying to save after an error.           clearInterval(saveInterval);           // Show the error from the PL/SQL Ajax Process.           apex.message.clearErrors();           apex.message.showErrors([             {type: "error", location: ["page"], message: data.status_msg, unsafe: false}           ]);`
