Re: yajl error management

Scott Klement <[email protected]>
Newsgroups gmane.comp.systems.as400.web
Message-ID <[email protected]>
The generic code that would apply to any error that occurred on the 
server would be 500...   But, 400 is a bit more specific, it implies 
that the data sent by the caller was invalid.

I definitely wouldn't use 200... that means "success".  So the caller 
might think their request was processed successfully if you return 200.

On 10/6/2021 3:51 AM, Dave 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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.