Home Articles Pitch Api

Contents

Start hereAPI DocsIntroductionSend your first eventEvent parametersStructured EventsActionsContextsError handlingManualIntroductionBasicsConventionsSetupTest modeNotificationsPWA

Chapter 2. Error handling

Response codes

Every time you make a request, you will get one of these status codes back.

201event created successfully

Event was created successfully.

400event wasn't created

Your event payload was deformed, or badly formatted. See the api docs for info.

401Authentication failed

Your API key was missing or invalid.

500Server error on our side

This indicates the problem was on our end. Please reach out to shash@operational.co if this were to happen.


Error handling

Unlike traditional logs, ops has a fairly diverse api footprint, eg you can send a lot of crazy stuff.

This means there’s a very likely possibility you might send us a request that won’t make it past our parsers. Don’t worry, we try to ingest the event data whenever possible.

  • userId field is meant to be a string. If you send a number, we’ll simply convert it to a string on our end.
  • If the name field inside a event is too long, it will simply be truncated.
  • Events cannot be more than 100kb big. If they are, we will try to figure out if the event’s type was json and if it was, it will be truncated. If the truncated event is under 100kb, ops will ingest the event.

In these scenarios, we’ll add warnings under the event letting you know that the event was modified so it could be ingested.

🤖
cron job started

12:00 am


Further reading

We recommend reading the owner’s manual to understand best practices.

Contexts