# How to pop up an error message in the front end with an Ajax request?

**URL:** https://meta.discourse.org/t/ajax/395532
**Category:** Development
**Created:** [February 9, 2026, 10:14am UTC](https://meta.discourse.org/t/ajax/395532 "2026-02-09T10:14:54Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![singi2016cn](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/singi2016cn/32/532755_2.png) [@singi2016cn](https://meta.discourse.org/u/singi2016cn)
#### Post date: [February 9, 2026, 10:14am UTC](https://meta.discourse.org/t/ajax/395532/1 "2026-02-09T10:14:54Z")

</div>

```plaintext
return render_json_error(
            'Cannot perform the pin operation.',
            status: 402
          )

```

Using the `render_json_error` method, how can I display an error message on the frontend?

---

_[View the full topic](https://meta.discourse.org/t/ajax/395532)._
