Skip to main content

Report Error

POST https://app.errordeck.com/api/:project_id/store

This endpoint is used to report an error to Errordeck.

Request

Headers

NameTypeDescription
Content-Typeapplication/jsonThe content type of the request.
AuthorizationBearer <token>The authorization token.

Body

{
"event_id": "7b48f3ee3fec4121b4567ea76c5c65be",
"timestamp": 1677934935,
"platform": "ruby",
"level": "error",
"logger": "ruby",
"transaction": null,
"server_name": null,
"release": "0.0.0",
"dist": "0.0.0",
"environment": "development",
"message": "test",
"modules": null,
"extra": null,
"exceptions": null,
"contexts": null,
"request": null,
"sdk": {
"name": "errordeck-ruby",
"version": "0.1.0"
},
"user": null
}

This is the least amount of data that you need to send to Errordeck.

Body parameters

NameTypeDescription
event_idStringThe id of the error.
timestampInt32The timestamp of the error.
platformStringThe platform of the error, example ruby or javascript.
levelStringThe level of the error.
loggerStringThe logger of the error.
transactionStringThe transaction or culprit class of the error.
server_nameStringThe server name where the error happened.
releaseStringThe release of the error.
distStringThe distribution name of the error.
environmentStringThe environment of the application.
messageStringThe message of the error.
modulesHash(String, String)?The modules of the error.
extraHash(String, String)?The extra data of the error.
exceptionsArray(Exception)?The exceptions of the error.
contextsHash(String, Context)?The contexts of the error.
requestRequest?The request of the error.
sdkSdkThe sdk of the error.
userUser?The user of the error.

Exception

Exception is the most important part of the error. It contains the stacktrace and the message of the error.

{
"type": "ZeroDivisionError",
"value": "divided by 0",
"module": null,
"thread_id": 0,
"stacktrace": [
{
"filename": "test.rb",
"function": "test",
"lineno": 2,
"colno": 0,
"in_app": true
},
{
"filename": "test.rb",
"function": "main",
"lineno": 5,
"colno": 0,
"in_app": true
}
]
}

Body parameters

NameTypeDescription
typeStringThe type of the exception.
valueStringThe message of the exception.
moduleStringThe module of the exception.
thread_idInt32The thread id of the exception.
stacktraceArray(Stacktrace)The stacktrace of the exception.

Stacktrace

Stacktrace is the stacktrace of the exception. It contains the filename, function, line number, column number and if it is in the application.

{
"filename": "test.rb",
"function": "test",
"lineno": 2,
"colno": 0,
"in_app": true
}

Body parameters

NameTypeDescription
filenameStringThe filename of the stacktrace.
functionStringThe function of the stacktrace.
linenoInt32The line number of the stacktrace.
colnoInt32The column number of the stacktrace.
in_appBoolIf the stacktrace is in the application.

Request

{
"url": "http://localhost:3000/",
"method": "GET",
"headers": {
"Accept": "*/*",
"Accept-Encoding": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
"Accept-Language": "en-US;q=1.0,en;q=0.9",
"Connection": "close",
"Host": "localhost:3000",
"User-Agent": "HTTPie/0.9.9"
},
"env": {
"GATEWAY_INTERFACE": "CGI/1.2",
"HTTP_ACCEPT": "*/*",
"HTTP_ACCEPT_ENCODING": "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
"HTTP_ACCEPT_LANGUAGE": "en-US;q=1.0,en;q=0.9",
"HTTP_CONNECTION": "close",
"HTTP_HOST": "localhost:3000",
"HTTP_USER_AGENT": "HTTPie/0.9.9",
"PATH_INFO": "/",
"QUERY_STRING": "",
"REMOTE_ADDR": ""
},
"data": null
}

Body parameters

NameTypeDescription
urlStringThe url of the request.
methodStringThe method of the request.
headersHash(String, String)The headers of the request.
envHash(String, String)The env of the request.
dataHash(String, String)?The data of the request.

Sdk

SDK is the sdk that is sending the error. It contains the name and the version of the sdk.

{
"name": "errordeck-ruby",
"version": "0.1.0"
}

Body parameters

NameTypeDescription
nameStringThe name of the sdk.
versionStringThe version of the sdk.

User

User is optional and is flexible. You can send any data you want. But we recommend to not send any user data here, except for internal id. We only use this data for counting unique users. We create an hash and throw away the data.

{
"id": "1"
}

Body parameters

NameTypeDescription
idStringThe id of the user.