Developer Function: Server Script: context.Error
## Overview
If an error occurs before creating, updating, or deleting a "Record" in the "[Server Script](/en/manual/table-management-server-script)", the process is canceled and an error message is displayed on the screen. The server script does not stop in the middle of the process.
## Limitations
1. When context.Error is set, the server script is processed, but only the error message is returned to the client. Therefore, the processing following context.Error is performed on the server, but is not reflected in the form on the client.
1. This is valid when the "「Condition」" of the server script is "Before Create", "Before Update", or "Before Delete".
## Syntax
```
context.Error(message);
```
## parameters
|Parameter|Type|Required|Overview|
|:----------|:----------|:---:|:---------------------------|
|message|string|Yes|error message|
## Return Value
There is no return value.
## Usage Example
In the example below, when a user with department ID 3 tries to update the "[Status Column](/en/manual/table-management-status)" to Complete, the operation is canceled and an error message is displayed. The condition is checked as "Before Update".
##### JavaScript
```
try {
if (context.DeptId === 3 && model.Status === 900) {
context.Error('Update cancelled because conditions were met.');
}
} catch (e) {
context.Log(e.stack);
}
```
## Related Information
<div id="ManualList"><ul><li><a href="/en/manual/table-management-status">Manage Table: Column: Status</a><span>10.02.2024 up</span></li></ul></article>
<ul><li><a href="/en/manual/table-management-server-script">Table Management: Server Script</a><span>08.13.2024 up</span></li></ul></article></div><input id="SearchTextHidden" type="hidden" value="" />