BillingItemFailed
v1.0.0

Event represents when a VisitDone Enrichment has failed

Details

This event is emitted when the process of billing a Visit has failed.

It is consumed by the Notification Service to notify the Devops Team of possible issues on the item.

Reasons for Failure

The reasons for failure are :

  • ORDER_UNAVAILABLE : can not request the order table (500 only)
  • BILLING_ITEM_UNAVAILABLE : can not request the billing_item table (500 only)
  • PRODUCT_UNAVAILABLE : can not find the product code in hybrid db (401, 404 or 500)
  • CUSTOMER_SEGMENT_UNAVAILABLE : can not find the customer segment (401, 404 or 500)
  • DISTANCE_TO_EPICENTER_INVALID : the epicenter distance of the property is negative or None for a product which use the distance range
  • DISTANCE_RANGE_RATE_UNAVAILABLE : can not find the distance range rate for a product which uses a distance range (401, 404 or 500)
  • ZONE_UNAVAILABLE : can not find the zone for a product which uses a property zone (401, 404 or 500)
  • ZONE_MODIFIER_UNAVAILABLE : can not find the zone_modifier for the product (401, 404 or 500)
  • PRICE_CALCULATION_FAILED : an unknown error occurs while calculating the billing item price (runtime error)
  • BILLING_ITEM_DB_REQUEST_FAILED : an unknown error occurs while creating/updating the billing item in the db (500 only)

Related Events

Is generally followed by a "FailedEventToDevOps" Notification being generated in the Notification Service through the Dispatch Service.

Consumer / Producer Diagram

Event Example

BillingItemFailed Schema (json)
{
  "version": "0",
  "id": "676ddc84-11d2-587b-34a3-bb0d7c1ac7f3",
  "detail-type": "BillingItemFailed",
  "source": "flatsy.service.billing",
  "account": "221760190323",
  "time": "2023-04-13T07:37:58Z",
  "region": "eu-west-3",
  "resources": [],
  "detail": {
    "metadata": {
      "application": "System",
      "service": "flatsy.service.billing",
      "actor": "System",
      "actorID": "System",
      "entity": "Visit",
      "correlationID": "b75c4ff1-b204-124a-c01b-87e11f8c7938",
      "entityID": "873940cd-76db-77831-b32c-03cda359098a",
      "version": "2.0",
      "requestID": "bdb6b724-fc25-47c1-94d8-8c8504e3f8bc",
      "reasonForFailure": "PRODUCT_UNAVAILABLE"
    },
    "data": {
      "request": { },
      "error": { }
    }
  }
}
Edit this pageLast updated on 2023/11/3