---
title: hook_again
description: Returns the position in the hook chain the currently executing hook occupies
---
import { Tabs, TabItem } from '@astrojs/starlight/components';

### Behaviour

* If the hook is being strongly executed then flag this specific hook in the chain for [Again As Weak Execution](/docs/hooks/concepts/weak-and-strong).
* If the originating transaction successfully is applied then the hook will be called again in a second, Weak Execution.

### Definition

<Tabs>
<TabItem label="C">
```c
int64_t hook_again(void);
```
</TabItem>
<TabItem label="JavaScript">
```javascript
function hook_again(): ErrorCode | number
```
</TabItem>
</Tabs>

### Example

<Tabs>
<TabItem label="C">
```c
int64_t result = 
  	hook_again();
```
</TabItem>
<TabItem label="JavaScript">
```javascript
const result = hook_again()
```
</TabItem>
</Tabs>

### Parameters

This API has no parameters

### Return Code

<Tabs>
<TabItem label="C">
<table><thead><tr><th width="176">Type</th><th>Description</th></tr></thead><tbody><tr><td>int64_t</td><td><code>1</code> iff successfully flagged for Again As Weak.<br /><br /><code>PREREQUISITE_NOT_MET</code><br />- This hook is already being executed weakly at the time of the call.<br /><br /><code>ALREADY_SET</code><br />- The function was already called this execution.</td></tr></tbody></table>
</TabItem>
<TabItem label="JavaScript">
<table><thead><tr><th width="176">Type</th><th>Description</th></tr></thead><tbody><tr><td>number</td><td>Returns a status code indicating the result of the operation.</td></tr></tbody></table>
</TabItem>
</Tabs>

