Labor API Create Shift Internal Server Error

Hello, we build our application 2 years ago, and suddenly we got error:
{“errors”: [{“code”: “INTERNAL_SERVER_ERROR”,“detail”: “An internal error has occurred, and the API was unable to service your request.”,“category”: “API_ERROR”}]}
with labor_api.create_shift endpoint.

We are still using the legacy squareconnect==2.20190724.1 version, so I try upgraded to latest square-python-sdk, but the error still happen.

But I found that error only happen when I include wage parameter in the request body, when I reomved wage parameter, it works again.

Code not work:

employee_wage = labor_api.list_employee_wages(employee_id=employee_id).employee_wages[0]
shift = Shift(employee_id=employee_id, wage=employee_wage, start_at=local_time.isoformat(), location_id="My Location ID")
shift_request = CreateShiftRequest(shift=shift)
labor_api.create_shift(body=shift_request)

Code work:

shift = Shift(employee_id=employee_id, start_at=local_time.isoformat(), location_id="My Location ID")
shift_request = CreateShiftRequest(shift=shift)
labor_api.create_shift(body=shift_request)

This is code with legacy SDK, but I translated it to latest square-python-sdk, the same behavior happen.

Is there anything I am doing wrong? I am sure the code with wage parameter is working before.
And is that OK I am still using squareconnect==2.20190724.1, since the migration will take a lot of works for us.

Thank you!

:wave: This doesn’t appear to be an issue with the SDK but an issue with the API. We’ve escalated this to the team and will be sure to reach out with any updates. :slightly_smiling_face:

@usunyu, the team has fixed this and it should be working as expected.

Thank you and team for quick fix :+1: