@open-mercato/core 0.10.1-develop.7727.1.0b89c4f800 → 0.10.1-develop.7736.1.88e07906bf

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -155,6 +155,14 @@ export class OcrService {
155
155
  guidance = 'Rate limit exceeded. Please try again later.'
156
156
  break
157
157
  default:
158
+ if (err?.name === 'TimeoutError') {
159
+ guidance = `OCR request timed out: ${rawMessage}`
160
+ break
161
+ }
162
+ if (err?.name === 'AbortError') {
163
+ guidance = `OCR request was aborted: ${rawMessage}`
164
+ break
165
+ }
158
166
  guidance = rawMessage.includes('https://')
159
167
  ? rawMessage
160
168
  : `${rawMessage}. Check OPENAI_API_KEY.`
@@ -86,6 +86,8 @@ export async function POST(req: Request) {
86
86
  const res = buildSafeRedirectResponse(req, '/login')
87
87
  res.cookies.set('auth_token', '', { path: '/', maxAge: 0 })
88
88
  res.cookies.set('session_token', '', { path: '/', maxAge: 0 })
89
+ res.cookies.set('om_selected_org', '', { path: '/', maxAge: 0 })
90
+ res.cookies.set('om_selected_tenant', '', { path: '/', maxAge: 0 })
89
91
  return res
90
92
  }
91
93
 
@@ -99,7 +101,7 @@ export const openApi: OpenApiRouteDoc = {
99
101
  methods: {
100
102
  POST: {
101
103
  summary: 'Invalidate session and redirect',
102
- description: 'Revokes the session identified by the `auth_token` sid claim and the `session_token` cookie, clears both cookies, and redirects the browser to the login page. A valid access token is not required, so a logout submitted after the access token expired still revokes the remember-me refresh session. A request that carries neither cookie is only redirected.',
104
+ description: 'Revokes the session identified by the `auth_token` sid claim and the `session_token` cookie, clears both cookies together with the organization-scope cookies (`om_selected_org`, `om_selected_tenant`), and redirects the browser to the login page. A valid access token is not required, so a logout submitted after the access token expired still revokes the remember-me refresh session. A request that carries neither session cookie is only redirected.',
103
105
  responses: [
104
106
  { status: 307, description: 'Redirect to login after successful logout', mediaType: 'text/html' },
105
107
  ],