Fix OpenAI JSON Crash in FastAPI Endpoint

Posted 5 hours ago

Worldwide

Summary

Hi, One endpoint in my FastAPI app sometimes crashes when parsing OpenAI responses. The issue is simple: json.loads() occasionally fails because the model returns invalid JSON. I just need this made stable. What I need: Handle invalid JSON safely (no crashes)Return a clear error message instead of a server errorRetry once if the response is invalidThat’s it. App is already working otherwise.

  • $70.00

    Fixed-price
  • Intermediate
    Experience Level
  • Remote Job
  • One-time project
    Project Type
Skills and Expertise
Mandatory skills
API Development
JSON
JavaScript
Activity on this job
  • Proposals:20 to 50
  • Interviewing:
    0
  • Invites sent:
    0
  • Unanswered invites:
    0
About the client
Member since Aug 4, 2022
  • United States
    Sarasota10:35 PM
  • $46K total spent
    197 hires, 42 active
  • 26 hours
  • Engineering & Architecture
    Mid-sized company (10-99 people)

Explore similar jobs on Upwork

Software DeveloperHourly‐ Posted 8 months ago
ASP.NET MVC
Django
Python
AngularJS
JavaScript
jQuery
WordPress
Google Chrome Extension
React
CRM Development
Microsoft Dynamics 365
Microsoft Dynamics CRM
Microsoft Dynamics Development
Microsoft PowerApps
Single Sign-On
Three.js
JavaScript
WordPress
AR Plugin
WooCommerce
3D Modeling

How it works

  • Post a job icon
    Create your free profile
    Highlight your skills and experience, show your portfolio, and set your ideal pay rate.
  • Talent comes to you icon
    Work the way you want
    Apply for jobs, create easy-to-by projects, or access exclusive opportunities that come to you.
  • Payment simplified icon
    Get paid securely
    From contract to payment, we help you work safely and get paid securely.
Want to get started? Create a profile

About Upwork

  • Rating is 4.9 out of 5.
    4.9/5
    (Average rating of clients by professionals)
  • G2 2021
    #1 freelance platform
  • 49,000+
    Signed contract every week
  • $2.3B
    Freelancers earned on Upwork in 2020

Find the best freelance jobs

Growing your career is as easy as creating a free profile and finding work like this that fits your skills.

Trusted by

  • Microsoft Logo
  • Airbnb Logo
  • Bissell Logo
  • GoDaddy Logo