OR OSP Event Handler Service Runbook¶
Overview¶
This is the runbook for Online Returns Service covers below given components.
Validate Authorized User.
Save Scanned Products data in RDS Table.
Save Manually entered Products data in RDS Table.
Fetch returned product and scanned product data in response.
Call Location V2 to get all store ids
This documents (and references) the component documentation. Below are a set of scenarios that may happen in production along with diagnosis and resolution information.
Reference¶
Docuement |
Ref |
|---|---|
Jira Story (OR OSP Event Handler service) |
|
Bitbucket(OR OSP Event Handler service) |
https://bitbucket.org/morrisonsplc/storepick-online-returns-osp-event-handler/src/master/ |
Runtime Issue List¶
Issue |
component |
Description |
|---|---|---|
Bad Url request |
If request Url is incorrect it raises exception with status code 404. |
|
Missing mandatory values in request body. |
When there is missing mandatory values in request body it raises exception with status code 400. |
|
Not Implemented Url request |
When the request contain url which is not implemented it raises exception with status code as 501. |
|
Service temporarily unavailable |
When the OR service is down it raises exception with status code as 503. |
|
ApplicationDependencies |
Exception while loading storepick-online-returns.json config. |
|
Incorrect Config details |
Exception when details given in input data is not valid. |
|
Invalid User |
Access token is invalid. |
|
Data Inconsistent in Database |
RDS session is down or DB table columns missing it raises Exception. |
Runtime Issues¶
Issue 1 (P2)¶
Scenario¶
if request Url is incorrect it raises exception with status code 404.
Error¶
404 Not Found.
Symptoms¶
OR service will respond with response code 404 .
Corrective Action¶
call service with correct url.
Issue 2 (P2)¶
Scenario¶
when there is missing mandatory values in request body it raises exception with status code 400.
Error¶
Payloadvalidationerror.
Symptoms¶
OR service will respond with response code 400 .
Corrective Action¶
call service with valid field data.
Issue 3 (P3)¶
Scenario¶
when the request contain url which is not implemented it raises exception with status code as 501.
Error¶
501 Not Implemented server error response.
Symptoms¶
OR service will respond with response code 501.
Corrective Action¶
Check if functionality is implemented.
Issue 4 (P1)¶
Scenario¶
when the OR service is down it raises exception with status code as 503.
Error¶
503 Service Unavailable server error.
Symptoms¶
OR service will respond with response code 503.
Corrective Action¶
Check if service svc-euw1-storepick-online-rtrn-svc-prd-002 is up and running in AWS ECS Cluster.
Issue 5 (P1)¶
Scenario¶
This happens when there is an error while loading all the dependencies needed for the application to run.
Error¶
Exception raised when loading dependencies.
Symptoms¶
Config service will respond with response code 404.
Corrective Action¶
Check config file name (storepick-online-returns.json) is correct.
Check if config fields are present in the config file.
Issue 6 (P1)¶
Scenario¶
This happens when the config details in the input is not correct.
Error¶
TypeError: ‘NoneType’ object is not subscriptable.
Symptoms¶
Raise Error pymorri.util.serverless_utils:resolve_env - input data is not: str, list or dict.
Corrective Action¶
Check config file name (storepick-online-returns.json) has correct data fields.
Check if config fields are having input value with correct details.
Issue 7 (P1)¶
Scenario¶
This happens when user email id is not inserted in storepick_online_returns.user_roles table.
Error¶
- Access token is invalid
Symptoms¶
Raise Error - Access token is invalid.
Corrective Action¶
Check user email id entry is exist in storepick_online_returns.user_roles table.
Issue 8 (P1)¶
Scenario¶
If RDS session is down it raises Exception.
Error¶
sqlalchemy.exc.OperationalError
Symptoms¶
Raise sqlalchemy.exc.OperationalError.
Corrective Action¶
Check Postgres is up and username, password, databaseName is correct in SSM Key storepick_online_returns_secret.
check if Scanned Product,Return product and Online Product table in RDS has valid data.