> For the complete documentation index, see [llms.txt](https://docs.cartesi.io/llms.txt)

---
id: register-exception
title: "Register an exception"
description: "The dApp should call this method when it cannot proceed with the request processing after an exception happens."
sidebar_label: "Register an exception"
hide_title: true
hide_table_of_contents: true
api: eJztWFtv67gR/isD9kEJqsiOtweLGpsC6dkUDbB7Njhx0QKxkTOWxhY3FKklqdiu4f++GFKy5CRnbw/bPqxfLA3J4Tcf58LRXpiaLHpp9G0hpsLSWjpP9mabU81SkYqCXG5lfJuKWUlQXNc1uNI0qoAclQJfSgcV+dIUsClJg/SQo9bGQ21NTlTARvoSfElg6YeGXDvgnNRrwJUnC6iBum2hxLom7bK5ng10t3suKWhS6Hw3Qs9kAxYqYLkLwwHlEvMn0oxKKjrZswOSzfVc/5tB20ZrHpKaJxZNHpBUpqA0KHyP1pOTcE+Wd/sWNa7JQo2NI3cy41vMS6kJUBdgGZqP46S9tATOoycwqyCr2rnewKZEz9Rt0MGSVsYyWznJZ0Y14C6b6w8G/jmb3QVVjYPcFAQbqRRz40h7MLZdS8WbFpaGyTva9tEo1dRRZ2ufJd9YHYEPt5mMx9lc32pYGl9Cjo5c1CF13fgexZOs69ODR2c03Pzn/c3d7Pa7D4GdwMrx1CtyDte9JStjN2iLYIJIRWv+302xE9O9yI32pD0/Yl0rmQc/Hn3v2FH3wuUlVchPfleTmAqz/J5yL1JRW/Z6L8nxaI07ZbAYTHTeSr1+0/XbySAdk8job3xJlpoKStrCUmq0O8ZdoQ/OS7CS1nnwGwN5iRZzT9YBWoJkvE1gZZQym+i1NUrr2C9K2mJBuaxQgW6qJa/w7By5sZZcbZg5A0YTLHeesrn+h7EgtfOoc0pZc0FYLIlWyWCN40V4tCGcjCK99iX8JZwGK3MwmUxSuPzyixQu/zrmp3fZXF9roKr2uyEDlmpL7G190EXqgmnxzGiLVa2Y1R6TSIWXPgjvWvIPh17WJ5/DgeURvYunNRmP+e/0ZK5zXkEv3cmX1mwyceCDXGGj/OuVN9aGSIk7ZCIdepWnrR/VCuXb/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wlJLFwobnZfHcb5aH9Jwt6tQD+4+H4/WD5rplzfUQef0Rzv/Rzv/P2vn2zZq0GUd2gv7vu1XHkTvxItUsJEs3O+X6OhfVh0OLP6hIbsT04dFKp7RSg47fjukoiQsyIYG54l23FlEx7+Y8dY8XTUM4dXnA2534orYWg7mDuEuBo3W3Xf3M5GKZftxgs+CP6jhhj9c4EZMhUiFCbaERjbI9kKhXje45rlxZ/79CEWjzwc=
sidebar_class_name: "post api-method"
info_path: cartesi-rollups/_versioned_docs/version-2.0/api-reference/rollup/cartesi-rollup-http-api
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Register an exception"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/exception"}
  context={"endpoint"}
>
  
</MethodEndpoint>



The dApp should call this method when it cannot proceed with the request processing after an exception happens.
This method should be the last method ever called by the dApp backend while processing a request.

When running in production mode, the Cartesi Server Manager pauses the Cartesi Machine and reverts the entire state of the machine to what it was before receiving the request.
No HTTP status code will be sent or received.

When running in host mode, the Rollup HTTP Server returns the status code 200.
In both cases, the input will be skipped with the reason EXCEPTION and the exception message will be forwarded.


<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={undefined}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"content":{"application/json":{"schema":{"type":"object","properties":{"payload":{"type":"string","description":"The payload is in the Ethereum hex binary format.\nThe first two characters are '0x' followed by pairs of hexadecimal numbers that correspond to one byte.\nFor instance, '0xdeadbeef' corresponds to a payload with length 4 and bytes 222, 173, 190, 175.\nAn empty payload is represented by the string '0x'.\n","example":"0xdeadbeef","title":"Payload"}},"title":"Exception"}}}}}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"Accepted the exception throw."},"default":{"description":"Error response.","content":{"text/plain":{"schema":{"type":"string","description":"Detailed error message.","example":"The request could not be understood by the server due to malformed syntax","title":"Error"}}}}}}
>
  
</StatusCodes>


      