Re: yajl error management
Charles Wilt <[email protected]>
| Newsgroups | gmane.comp.systems.as400.web |
|---|---|
| Message-ID | <CAJ=Tnc6r10hqFeaD7jrThmomBfNYUui_BqeQ86uOKqApsUoOVQ@mail.gmail.com> |
I'd expect 400 Bad Request - the server cannot or will not process the request due to an apparent client error (e.g., malformed request syntax, size too large, invalid request message framing, or deceptive request routing). However, are you sure the characters are actually invalid? JSON is UTF-8. Are the characters invalid only because you're trying to stuff them into an EBCDIC variable? You may need to stuff them into a UTF-8 and then remove any chars you can't handle. Charles On Wed, Oct 6, 2021 at 2:51 AM Dave <[email protected]> wrote: > Hello, > > I'm getting an error caused by invalid characters in the JSON data that my > program is reading. I've made the program end and issued a call > to YAJL_writeStdOut with the error message. I'm not sure what value I > should use as http status, 200 or 500? Also, I have no idea how this will > be received or used by the client. I'm guessing that it should be his > responsibility to indicate how such errors should be returned? > > Thanks > -- > This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing > list > To post a message email: [email protected] > To subscribe, unsubscribe, or change list options, > visit: https://lists.midrange.com/mailman/listinfo/web400 > or email: [email protected] > Before posting, please take a moment to review the archives > at https://archive.midrange.com/web400. > > -- This is the Web Enabling the IBM i (AS/400 and iSeries) (WEB400) mailing list To post a message email: [email protected] To subscribe, unsubscribe, or change list options, visit: https://lists.midrange.com/mailman/listinfo/web400 or email: [email protected] Before posting, please take a moment to review the archives at https://archive.midrange.com/web400.